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.
How can I handle selection in a virtual way with the virtual grid?
Basically I would expect the selection state to be party of the Style or have some virtual style callback - but it is not and is only held in the GridModelSelections class.
It looks as if the selection state is looked up deep within GridPaint there also seems to be no way to provide the state tracking for GridModelSelections (i.e. intercepting manipulations of the GridModelSelections and storing it in some custom form).
ADAdministrator Syncfusion Team February 20, 2007 10:15 PM UTC
Hi James,
Use the AlphaBlendSelectionColor property to change the selected cell color in a Grid.
this.grid.AlphaBlendSelectionColor = Color.Red;
Best regards, Haneef
JMJames MulveyFebruary 21, 2007 11:18 AM UTC
The suggestion will only change the selection color across the grid - I'm not looking to do that. I want to supply the selection in a virtual manner - or tell the grid whether to paint a cell selected or not (i.e. not the selection color but the cell selected state).
ADAdministrator Syncfusion Team February 21, 2007 07:34 PM UTC
Hi Jamulvey ,
Use the Model.Selections property to manages selected ranges in the grid. It allows you to add, remove and get selections, determines selection state of a specific cell.
//Select a cell this.grid1.Model.Selections.Add(GridRangeInfo.Cell(RowIndex,ColIndex));
//Remove the selection this.grid1.Model.Selections.Remove(GridRangeInfo.Cell(RowIndex,ColIndex));
//get the selection. this.grid1.Model.Selections.GetSelectedRanges(out rangeList,true);