Is it possible to save an currently selected row to a database?

96 views Asked by At

In the DataGridView if you just have edited an field, you have to deselect or change the currently selected row in order for the changes to be applied in the database.
I was wondering if there is way to deselect the current row so I can update the changes in the database without clicking away from the current row?
Iam using an DataGridViewButtonColumn which opens another form, in which I edit the values, but when I try to update the changes to database it wont update(I have already binded these values to TextBox), because the row is currently being selected. But if I click another row in DataGridView and save, then the changes are applied.
I have already tried commands dgv.ClearSelection(); and dgv.CurrentCell = null;

0

There are 0 answers