S
Sam
Hi,
I've got two grids on my form. When one loses the focus I do the
following:
Private inFocusing As Boolean = False
Private Sub dgParams_LostFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles dgParams.LostFocus
If (Not dgParams.ContainsFocus) And (Not inFocusing) Then
If Not save() Then
inFocusing = True 'enter into receiving focus
Try
dgParams.Focus()
SelectRowInGrid(dgParams, 1)
Finally
inFocusing = False ' exit from receiving focus
End Try
End If
End If
End Sub
Private Function save() As Boolean
Return False
End Function
Issue is that it goes twice in Save(). Besides I would like to prevent
a click on a row of a grid, if the Save function returns False in the
lostFocus event of the other grid. How can I do that?
Thanks
I've got two grids on my form. When one loses the focus I do the
following:
Private inFocusing As Boolean = False
Private Sub dgParams_LostFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles dgParams.LostFocus
If (Not dgParams.ContainsFocus) And (Not inFocusing) Then
If Not save() Then
inFocusing = True 'enter into receiving focus
Try
dgParams.Focus()
SelectRowInGrid(dgParams, 1)
Finally
inFocusing = False ' exit from receiving focus
End Try
End If
End If
End Sub
Private Function save() As Boolean
Return False
End Function
Issue is that it goes twice in Save(). Besides I would like to prevent
a click on a row of a grid, if the Save function returns False in the
lostFocus event of the other grid. How can I do that?
Thanks