We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridDataBoundGrid - Selecting Text Within a Cell Programatically

Thread ID:





93188 Mar 2,2010 04:57 PM UTC Mar 4,2010 03:00 PM UTC ASP.NET Web Forms (Classic) 1
Tags: GridGroupingControl
Jeffrey Dufseth
Asked On March 2, 2010 04:57 PM UTC


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.

Anyone know how to select text programatically?


Rajadurai C [Syncfusion]
Replied On 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);

GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
if (cc.Renderer is GridComboBoxCellRenderer)
GridComboBoxCellRenderer rend = cc.Renderer as GridComboBoxCellRenderer;
if (rend != null)



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon