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

Auto Block Select (Highlight) cell content on inline editing

1 Answer 324 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dvorak
Top achievements
Rank 1
Dvorak asked on 13 May 2013, 02:35 AM
http://demos.kendoui.com/web/grid/editing.html

Is there a way to automatically select (highlight) the content of the cell when the cell has been clicked for editing?

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 14 May 2013, 11:43 AM
Hello Dvorak,


To highlight the text in the input fields, you could bind to the edit event, which is fired when the Grid enters in edit mode, find the input via jQuery and highlight the text with the select method. A sample implementation would be:
E.g.
function edit(e) {
    $(e.container).find("input[type=text]").select();
}

 

All the best,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Dvorak
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or