I have a dataGridView which I have being populated by a connection to MSSQL. The code is extremely simple:
GlobalClass.adap = new SqlDataAdapter(query, con);
bui = new SqlCommandBuilder(GlobalClass.adap);
GlobalClass.dt = new DataTable();
dataGridView1.DataSource = GlobalClass.dt;
dataGridView1.ReadOnly = false;
In the code below it I set certain columns to readOnly values and others to allow updating. You can edit a cell and the changes will take. However, the update to the database seems to lag. One either has to exit the application or leave the row and come back to it before the update gets to the database.
I've tried everything under the son to get it to commit earlier. For some reason it's not getting there unless one of the two events above takes place.