Mark row as deleted in dataTable on UserDeletingRow

Posted by dav.evans on Stack Overflow See other posts from Stack Overflow or by dav.evans
Published on 2010-04-27T08:11:21Z Indexed on 2010/04/27 8:33 UTC
Read the original article Hit count: 327

I have a datatable bound to a winforms dataGridView via a BindingSourceControl. I want to be able handle the UserDeletingRow event from the dataGridView and mark the row in my dataTable as deleted. I need to then be able to retrieve the rows marked as deleted from the datatable so that I can delete them from my database when a Save button is clicked. Please not I dont want to delete from the database on each firing of UserDeletingRow, only mark that row as deleted in my dataset.

Can anyone point out how to do this?

© Stack Overflow or respective owner

Related posts about dataset

Related posts about datagridview