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.
CBClay Burch Syncfusion Team August 25, 2009 07:40 PM UTC
This task is not necessarily simple because the TextBox is only available as the cell is actively being edited. So, this code only applies to a TextBox CellType, and only if the cell is being actively edited.
GridCurrentCell cc = gridControl1.CurrentCell; // or this.gridDataControl1.Model.Views.First().CurrentCell; GridCellTextBoxRenderer renderer = cc.Renderer as GridCellTextBoxRenderer; if (renderer != null) { TextBox tb = renderer.CurrentCellUIElement as TextBox; if (tb != null) { //set 'Apple' into the text renderer.ControlText = "Apple"; //this code puts the cursor after the last 'p' tb.SelectionStart = 3; tb.SelectionLength = 0; //insert 'xx' after last p tb.SelectedText = "xx"; } }