cell textbox activation

When you're in a cell, and you tab to another cell with existing text, then start typing, the existing text is replaced with whatever you type.

However, when you click on a cell, the cursor is inserted into the existing text where you clicked. For example, if the cell contains "Hello World", and you click on the cell just over between the "W" and "o", that's where your cursor shows up, and anything you type is inserted into that place in the string.

How can I set the cell such that it behaves as if you tabbed to it when you click on it, so that when the user starts typing, the existing text is wiped clean?

1 Reply

MN Muthulakshmi N Syncfusion Team August 23, 2010 08:22 AM UTC

Hi Joseph,

Thank you for your details.
we have modified the “GridCellTextBoxRenderer.cs” file based on your request
also prepared a workarround sample which illustrates your request. Please download the sample from the below location.

Link:
http://www.syncfusion.com/uploads/redirect.aspx?file=WpfApplication1_e0c0d14a.zip&team=development

C# code for add new cell type to GridControl:

this.grid.Model.CellModels.Remove("TextBox");
this.grid.Model.CellModels.Add("TextBox", new CustomGridCellTextBoxModel());

Let us know if you need any details.

Thanks,
Muthulakshmi

Loader.
Up arrow icon