Arik Grinstein via .NET 247 <(E-Mail Removed)> wrote:
> I have the following problem. I have a DataGrid bound to a DataTable.
> I am deleting elements from the DataGrid but not by pressing the
> delete key but by selecting a row and pressing a button outside the
> grid. The deletion from the grid is no problem but how do i delete
> from the Table since the CurrentRow is no longer a valid index that i
> can use to compare in the DataTable after the first delete. can
> someone give me an idea on how can I accomplish this?
Well, the row itself should be marked as deleted, so you can just call
DataAdapter.Update(table) and the update should happen appropriately.
--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too