Deleting DataGridViewRow with Underlying DataRelation
Posted on 2006-06-26
I have a DataGridView which is populated from a DataTable that has a foreign key constraint linking it to another DataTable.
When I delete a row in the DataGridView that the second DataTable depends on, the DataError event is fired because the deletion will cause orphan rows in the second DataTable.
Is there any way to delete/remove a row from the DataGridView (rendering it not visible to the user) without deleting it in the underlying DataTable?
This would be useful becuase I never want to physically delete records, but rather to set a boolean flag indicating it as deleted.