I'm having problems with DGV's in .NET when it comes to saving information from the view. If the user has been entering information into the record (i.e. CellBeginEdit has been raised, but not CellEndEdit yet) and then saves the record, the changes made to the row will not be saved, because they haven't clicked off the row.
Short of creating a global variable and updating it, is there a property I can check to see if the user is currently editing the row, then force that row to update the view, so it can be saved to a file?
I'm trying to avoid doing this:
Any help would be greatly appreciated!
Short of creating a global variable and updating it, is there a property I can check to see if the user is currently editing the row, then force that row to update the view, so it can be saved to a file?
I'm trying to avoid doing this:
Code:
private g_bRowEditing as Boolean = False
Private Sub dgvStructureDataGrid_CellBeginEdit(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellCancelEventArgs) Handles dgvStructureDataGrid.CellBeginEdit
bRowEditing = True
End Sub
Private Sub dgvStructureDataGrid_CellEndEdit(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvStructureDataGrid.CellEndEdit
bRowEditing = False
End Sub
Comment