Deleting Row From DataTable...

Results 1 to 2 of 2

Thread: Deleting Row From DataTable...

  1. #1
    Join Date
    Dec 1969

    Default Deleting Row From DataTable...

    Hello All,<BR><BR>I am having some trouble deleting a row from a datatable, basically what I need to happen is relate the DataKey of the row I want to delete that is in a DataGrid, to the row array number of the DataTable.<BR><BR>Is there any way to explictly tell the DataTable to delete a row based on a condition? For example the logic would be something like this, even though the syntax is probably all wrong:<BR><BR>DataTable.Row(x).Delete .... Where x would be the &#039;DataKey&#039; returned by the DataGrid...<BR><BR>any help would be appreciated.. thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Deleting Row From DataTable...

    -Create a column with a hyperlink or button column called "Delete"<BR>-create a command name called "delete" for that column<BR>-in the &#060;asp:datalist...&#062; tag set the OnDeleteCommand to the function that deletes the item from you table source<BR>-rebind your source to the table when you&#039;re done

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts