The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
Thanks
ADAdministrator Syncfusion Team May 9, 2005 05:00 PM UTC
Btw, I''m using a virtual grid
ADAdministrator Syncfusion Team May 9, 2005 05:15 PM UTC
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 06:05 PM UTC
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:
this.gridControlNodeList.Selections.SelectRange(GridRangeInfo.Row(e.Index), e.Selected);
where e is my eventargs object that contains the rowindex and if the row is selected or not.