I have been using the UltraGrid for a while in a windows form application and am not seeing the selection behaviour I would expect.
We have a notion of an active row which works fine - you left click the row and it becomes highlighted as shown. But sometimes, seemingly at random after a row has been selected it remains selected in a different colour after the active row has been changed again.
See the attached screenshot. Here the row with the value 6,000.00 was selected in the past, but now the row with 11,000.00 is selected and active. The row with 6,000.00 still looks different to the other rows. What is this visual effect signifying and how can I prevent it? I just want a grid with a single active/selected row when you left click on the row.
Hi,
It looks like you have quite a bit of styling going on there, so it's tough to say for sure. But my guess is that you are mixing up Active and Selected. You seem to use these interchangeably in your post, but they are not the same thing, so you need to be careful.
If you are only interested in dealing with one row at a time and your users never need to select more than one row, then I recommend that you don't use selection at all and always deal with the ActiveRow.
Simply disable row selection completely by setting the SelectTypeRow property (on the Override) to None. Then make sure your code is always using grid.ActiveRow and not grid.Selected.Rows[0].
That should simplify your code and hopeful solve this issue.