I am sure this has been asked many times, but I have looked through the docs and KB, but still have not found the answer.
How do I programmatically select or deselect a row?
For example, if row 2-5 and 8 are selected, but lets say a button somewhere deselects all rows that are a multiple of three, then the result would be 2, 4, 5, and 8 being selected.
If it is not trivial, just point me to the place in class reference where I should look and I will figure it out.
ADAdministrator Syncfusion Team May 9, 2005 12:00 PM
Btw, I''m using a virtual grid
ADAdministrator Syncfusion Team May 9, 2005 12:15 PM
Here are three methods you can use to manipulate selections:
clear all selections - grid.Selections.Clear
select/unselect a range - grid.Selections.SelectRange
check if a range is selected - grid.Selections.Ranges.AnyRangeContains
ADAdministrator Syncfusion Team May 9, 2005 01:05 PM
Clay: Thanks for the direction.
I was on the right track with grid.Selections.SelectRange
but I did not see the static method GridRangeInfo.Row(rowIndex).
For others that come across this, my solution is:
where e is my eventargs object that contains the rowindex and if the row is selected or not.