If you have a DataGridView that is bound to a DataView (someDataTable.DefaultView).
..and a number of edits are performed on rows in the underlying DataTable from code.
Is it possible to defer the updating of the DataGridView until you decide that you are finished editing rows?
As it is, the DataGridView is updated after every edit, which, if you don’t require instant feedback, is inefficient and a little visually jarring if you are updating many rows in the DataTable one after the other.
In order to be able to temporarily suspend data binding, you’ll have to put a
BindingSourcebetween yourDataGridViewand yourDataView. By setting theRaiseListChangedEventsproperty of theBindingSourceto false, changes in the underlying source are not notified to theDataGridView. You can drag & drop aBindingsourcecomponent from the toolbox in the design view. I tried to set up the data sources via the designer but it didn’t work, so I did it in code:To suspend data binding, just set the
RaiseListChangedEventsproperty to false:To resume data binding, just set the
RaiseListChangedEventsto true and reset the bindings so the display is updated: