When binding a DataGridView control to a binding source, I\'m getting the following error in my application:
Operation is not valid becau
This can be caused by manipulating the datasource while the DataGridview is in BeginEdit.
Another solution is to SuspendBinding on the CurrencyManager of the DataGridView while manipulating the datasource.
CurrencyManager currencyManager = (CurrencyManager)BindingContext[dataGridView1.DataSource];
currencyManager.SuspendBinding();
// Manipulate datasource
currencyManager.ResumeBinding();