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.
Hi! I update contents of GridControl on timer, but the cell previously selected must remain selected after refresh (i.e. with selection border). I can save its row and col before updating, but how can I programmatically select it again? And show selection BORDER!
HAhaneefm Syncfusion Team March 28, 2007 08:36 PM UTC
Hi Andrey,
One way you can do this by using the Model.Selections property. The Model.Selections property allows you to add, remove and get selections, determines selection state of a specific cell. Here is a code
//Before calling the Refresh method you need to store the selected range to the GridRangeInfoList GridRangeInfoList list; this.gridControl1.Model.Selections.GetSelectedRanges(out list,true); this.gridControl1.Refresh();
//and then set the list as selected range in a grid after calling the refresh. foreach(GridRangeInfo info in list) this.gridControl1.Model.Selections.Add(info);
Best regards, Haneef
AGAndrey GruberMarch 29, 2007 09:31 AM UTC
Hi, Haneef! The code above works fine except the fact I need to see a border around the cell, as after mouse click - in the color scheme we work with, the selection color is light gray and is almost not visible. In other words, I need to emulate mouse click on the cell in order to see selection border.
HAhaneefm Syncfusion Team March 29, 2007 07:41 PM UTC
Hi Andrey,
Please try this code.
int RowIndex = this.grid.CurrentCell.RowIndex; int ColIndex = this.grid.CurrentCell.ColIndex;