This is a migrated thread and some comments may be shown as answers.

select cell contents onEdit

2 Answers 152 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lee
Top achievements
Rank 1
Lee asked on 23 May 2017, 04:54 PM

I have an editable grid using InCell as the Edit Mode.  I have one field that is editable.  When that cell gets focus I want it to select the contents of the cell.  So for instance if the cell contains "100" and it gets focus I want the "100" to be selected so that the user can type over it with out having to backspace.   I have tried putting a this.select();  in the onEdit Code when that column is being edited but it isn't working.

Thx for help

Lee

2 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 24 May 2017, 07:38 PM
Hi Lee,

It is possible to achieve that by calling the select method on the input inside the cell. Have in mind that when editing numeric data the input is replaced with numeric text box dynamically. In the dojo illustrates how to achieve the aforementioned approach.


Regards,
Georgi
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Lee
Top achievements
Rank 1
answered on 24 May 2017, 08:49 PM

Worked beautifully.  Thanks for reply

Lee

Tags
Grid
Asked by
Lee
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Lee
Top achievements
Rank 1
Share this question
or