delPiero
9 years ago
hello,
I have an igrid and normally I have it so that you can select one entire row at a time.
I would like to know how can I deselect the rows when clicking on igrid blank space.

I normally have something like on DoubleClick
iGridUser.PerformAction(iGActions.DeselectAllRows)
but I am looking for a single Click
Igor/10Tec
9 years ago
So in fact the question is how to know whether the user has clicked the empty area. You can use the Cells.FromPoint method to find the cell under the mouse pointer, and do your work if it is Nothing:

Private Sub iGrid1_MouseDown(sender As Object, e As MouseEventArgs) Handles iGrid1.MouseDown

   If IsNothing(iGrid1.Cells.FromPoint(e.X, e.Y)) Then

      iGrid1.PerformAction(iGActions.DeselectAllRows)

   End If

End Sub
delPiero
9 years ago
thanks so much!