Hello!
I have a DataGridView (myDataGridView.DataSource = myDataTableBindingSource) bound to a DataTable which is filled by an OleDbDataAdapter (myDataAdapter).
After the user has entered the data to a new row the row is saved to the database:
Now I need to update the DataGridView, because the id is assigned by the database.
In order to update the datagridview, I call this method
But the id does not get updated, it stays empty. At the same time the record has been added to the database and the id has been assigned correctly.
How can I make the dataGridView to really reread all records from the database?
I have a DataGridView (myDataGridView.DataSource = myDataTableBindingSource) bound to a DataTable which is filled by an OleDbDataAdapter (myDataAdapter).
After the user has entered the data to a new row the row is saved to the database:
Code:
myDataAdapter.Update(myDataTable)
In order to update the datagridview, I call this method
Code:
myDataGridView.ResetBindings()
How can I make the dataGridView to really reread all records from the database?