Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Christian on May 16, 2008 06:49
open dhtmlx forum
Select Text

It is possible in javascript select the text in a cell in the grid.
For example when go into edit mode

Thanks Christian
Answer posted by Support on May 16, 2008 07:47

There is no API call for such task , but next code snippet works for most column types

            if (grid.editor) grid.editor.obj.select();

grid.editor - pointer to currently active editor

Answer posted by Christian on May 16, 2008 08:03
There any way to do it in cell type combo (dhtmlxcombo)
 
Thanks Christian
Answer posted by Support on May 19, 2008 05:19

You can try the next code

if (grid.editor && grid.editor.combo) grid.editor.combo.DOMelem_input.select();

Answer posted by Christian on May 21, 2008 19:36
 
In the case of dhtmlxcombo xxx I put
 
if (grid.editor && grid.editor.combo) grid.editor.combo.DOMelem_input.select();
 
on the stage 1 of doOnCellEdit but it does not work. Any idea that may be happening

Thanks Christian