select content of a cell when entering the cell

I have a grid that I want to have the whole content of a cell to be selected when the user enters the cell. this would allow them to start typing and overwrite what is currently in the cell.



I have tried to use the selectCell() method but that wont select the contents.



In case of “ed” eXcell type you can use:

mygrid.attachEvent(“onEditCell”,function(stage,rowId,cellIndex){
if (stage==1){
this.cell.firstChild.select()
return true;
}
return true;
})