Deleting rows in dataset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can i delete a row in dataset based on the column value, i have four
columns in a row and i want to delete the row based on the column1 value.
 
Hi,

Select the rows you wish to delete (perhaps using DataTable.Select method or
dataview) and do an inverse for loop (from latest row to first row) - inside
the loop call DataRow.Delete method.
And, of course, call DataAdapter.Update to persist the changes in database
if you wish.
 
Back
Top