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 have a question about selecting text in the activeCell. Currently, I set the property ActivateCurrentCellBehaviour to SelectAll which works how I need it to except in one case. If I enter a cell the text gets selected properly however if the text is still selected and refresh gets called on the grid the text becomes unselected is there any way I can get around this. I need the text to stay selected if it was selected before the refresh was called.
ADAdministrator Syncfusion Team May 27, 2004 06:45 PM UTC
Are you explicitly calling Refresh? if so, you can save the selection state of the currentcell, and then restore it after the call?
GridCurrentCell cc = this.gridControl1.CurrentCell;
GridTextBoxControl tb = cc.Renderer.Control as GridTextBoxControl;
int selStart = tb.SelectionStart;
int selLength = tb.SelectionLength;
// do your refresh
this.gridControl1.Refresh();
//reset thing
cc.BeginEdit();
tb.SelectionStart = selStart;
tb.SelectionLength = selLength;