I have a DataTable
with many rows, and the DataTable
is bound to a DataGrid
. After deleting one or more rows via the DataGrid
, I need to run specific, quite complex checks on the remaning rows.
I subscribe to the RowDeleted
event, and call the checking method from there. My problem is, when deleting multiple rows via the DataGrid
, the RowDeleted
event is fired for every single row, calling the checking method every time. As the checking method checks all the remaining rows and all their columns, it is a big slowdown for my application, also very redundant. It would be enough to run it once all the selected rows are deleted.
Is there a way to fire only one event after deleting any number of rows?