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 need to select the text within a specific cell programatically. I am using the GridDataBoundGrid.
Currently, when a user opens a grid drop down box, if they want to start typing to get to their item faster, they have to manually select or delete the text in that cell. Because of this, I want to select the text automatically when they open a drop down box.
RCRajadurai C Syncfusion Team March 4, 2010 03:00 PM UTC
Hi Jeffrey,
Thanks for your interest in Syncfusion Products.
To set the text selected in the dropdowncell on opening the dropdown, you can handle the CurrentCellShowingDropDown event with the following kind of code which is used for Combobox cell in GridDataBoundGrid. //Method Invoker this.gridDataBoundGrid1.CurrentCellShowingDropDown += new Syncfusion.Windows.Forms.Grid.GridCurrentCellShowingDropDownEventHandler(gridDataBoundGrid1_CurrentCellShowingDropDown);
//gridDataBoundGrid1_CurrentCellShowingDropDown GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell; if (cc.Renderer is GridComboBoxCellRenderer) { GridComboBoxCellRenderer rend = cc.Renderer as GridComboBoxCellRenderer; if (rend != null) rend.TextBox.SelectAll(); }