Dataview + delete row

Astie

Active member
Joined
Oct 20, 2005
Messages
27
Location
Holland
Programming Experience
Beginner
hello,

i'm using a dataview to fill my datagrid. Now i want to use a button to delete the currunt row. i've looked everywhere but nowhere they have the solution for this.

greats Astie
 
There are a number of ways to get the current row. You can use the form's BindingContext if you like, but I've never done that myself. You can simply index the DataView using the DataGrid's CurrentRowIndex property and then call Delete on the DataRowView it returns. Note that that marks the row as deleted, but it is not actually deleted until you sync your data with the database.
 
Back
Top