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. Image for the cookie policy date

Text selection in a cell of type TextBox

I'm editing values via a grid grouping control. When the user clicks on a cell which has a CellType of Textbox the text in that cell should be selected by default.

Also if the text changes in any way I need to enable some buttons before the user clicks out of the cell, what would the appropriate event to use?

Thanks
Shane



2 Replies

JO Johnson Syncfusion Team April 19, 2008 12:31 AM UTC

Hi Shane,

Thank you for using Syncfusion products.

Issue 1:(Select the Text when enter into Editmode)
<<<<<<<<<<<
Please use below code snippet for fix this issue.

this.gridGroupingControl1.TableControl.Model.Options.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAll;

Issue2:(Which event is fired when Text change in the cell )
<<<<<<<<<<<
//Event declaration
this.gridGroupingControl1.TableControlCurrentCellValidateString += new GridTableControlCurrentCellValidateStringEventHandler(gridGroupingControl1_TableControlCurrentCellValidateString);

//Event handler
void gridGroupingControl1_TableControlCurrentCellValidateString(object sender, GridTableControlCurrentCellValidateStringEventArgs e)
{
string ss = e.Inner.Text;
}

Please let me know if you need further assistance.

Best regards,
Johnson





SH Shane April 22, 2008 09:58 AM UTC

That worked fine.

Thanks


>Hi Shane,

Thank you for using Syncfusion products.

Issue 1:(Select the Text when enter into Editmode)
<<<<<<<<<<<
Please use below code snippet for fix this issue.

this.gridGroupingControl1.TableControl.Model.Options.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAll;

Issue2:(Which event is fired when Text change in the cell )
<<<<<<<<<<<
//Event declaration
this.gridGroupingControl1.TableControlCurrentCellValidateString += new GridTableControlCurrentCellValidateStringEventHandler(gridGroupingControl1_TableControlCurrentCellValidateString);

//Event handler
void gridGroupingControl1_TableControlCurrentCellValidateString(object sender, GridTableControlCurrentCellValidateStringEventArgs e)
{
string ss = e.Inner.Text;
}

Please let me know if you need further assistance.

Best regards,
Johnson






Loader.
Live Chat Icon For mobile
Up arrow icon