Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by U. Fiege on Jun 19, 2007 08:06
open dhtmlx forum
Select Content of a cell when calling editCell() method.

Hi !

Is it somehow possible to select the text in a cell when the editor is invoked on a key event by editCell() ?

e.g. (doesn't work, just as an illustration)

  document.getElementbyId('blabla').select();


The goal is that the user can replace the text in that cell without the need to select it all.

Thanks,

U. Fiege

Answer posted on Jun 19, 2007 14:31
There is no universal code for all types of excell but necessary behaviour can be achieved in next two ways

a) modification of dhtmlxGridCell.js
    in code of related exCell locate next string
       this.obj.focus()
    and replace with
       this.obj.focus()
       this.obj.select()

b) manual api call
    mygrid.editCell();
    mygrid.editor.obj.select(); // will work only for most common excell types
Answer posted by radyno (Support) on Dec 07, 2014 03:55

If you haven't found the needed information there and still looking for a solution, you will find the additional help checking ajax combo box and making a website.