I have a DataGridView in VS2005 where one column is of type DataGridViewCheckBoxColumn. User can review this grid, check some rows with the checkboxes and use (context)menu to generate a list of selected rows.
Problem is that the last checkbox clicked is not commited until user clicks another row. Row appear checked, but is missing in the generated list.
This is the code trying to fix it, but not working, I'm trying to commit the "edit-in-progress" immediately when user click checkbox:
Anyone got a simple solution?
Problem is that the last checkbox clicked is not commited until user clicks another row. Row appear checked, but is missing in the generated list.
This is the code trying to fix it, but not working, I'm trying to commit the "edit-in-progress" immediately when user click checkbox:
VB.NET:
Private Sub DGW_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGW.CellClick
If e.ColumnIndex = 0 Then
DGW.CommitEdit(DataGridViewDataErrorContexts.Commit)
End If
End Sub