The easiest way to handle this is to use the Binding Source object.
If you load information into your DataGridView from an access database, you most likely save the data in a dataset or DataTable.
Create a binding source object, and once you populate your DataTable / Dataset, set the data source for your binding source to your DataTable. Then set the data source from the DataGridView as the binding source object.
Doing this ensures that any changes to your datagridview are either reflected in the DataTable and vice versa. If you reload the data into your DataTable, it will automatically be reflected in the data grid.
DataTable dt = new DataTable(); BindingSource bs = new BindingSource(); bs.DataSource = dt; dataGridView1.DataSource= bs;
All changes will now be performed automatically.
source share