Hello Igor,
Since Igrid does not implement "row tracking" (maybe in the version 7...), I tried to simulate it using the events "
CellMouseEnter" and "
MouseLeave".
The principle is very simple.
In the the
CellMouseEnter event I use the the
SetCurRow method to select the current row.
For sure, this method could be improved. It is just for this test.
Private Sub IGrid1_CellMouseEnter(sender As Object, e As iGCellMouseEnterLeaveEventArgs) Handles IGrid1.CellMouseEnter
Me.IGrid1.SetCurRow(e.RowIndex)
End Sub
I use the
MouseLeave event to detect when the mouse is outside the grid.
When this event is fired, I use the
PerformAction method with the action
iGActions.DeselectAllRows in order to deselect the current selected row.
Private Sub IGrid1_MouseLeave(sender As Object, e As EventArgs) Handles IGrid1.MouseLeave
Me.IGrid1.PerformAction(iGActions.DeselectAllRows)
End Sub
I explain my problem :
When I move the cursor inside the grid, everything works perfectly. The "row tracking" is well simulated.
The problem occurs when the mouse leaves the grid and re-enter at the same previous row index.
Indeed, if I leave the grid for instance at the row index 2, the row is well deselected.
But when I enter the grid at the same row index, the row is not selected (the CellMouseEnter is well fired).
If I enter at another row index, the row is selected this time.
I do not understand this behavior and I cannot resolve it using a workaround.
I've attached the VB project.
I really need your lights...
Thank you !
IgridTest.zip
(412kb) downloaded 45 time(s).