LookupGrid: Fix crash when clicking on new row checked column

This commit is contained in:
Jonathan Jenne 2022-03-24 11:47:21 +01:00
parent 796ae4a87f
commit 04e3b32895

View File

@ -191,6 +191,11 @@ Public Class frmLookupGrid
End Sub
Private Sub viewLookup_RowCellClick(sender As Object, e As RowCellClickEventArgs) Handles viewLookup.RowCellClick
If e.RowHandle = GridControl.InvalidRowHandle Or e.RowHandle = GridControl.NewItemRowHandle Then
e.Handled = False
Exit Sub
End If
' When AllowFocus is used on the SELECTED Column, the checkbox can only be selected with a double click
' This function manually checks/unchecks the clicked cell
If MultiSelect AndAlso e.Column.FieldName = COLUMN_SELECTED Then