Hi
I had earlier asked this question in reply to which you sent me the below solution.
if (stage==1&&this.editor.obj&&this.editor.obj.select)
{
this.editor.obj.select();
}
This works perfectly fine but on some grids it is throwing me "this.editor.obj is null or not an object" error. Any idea why this is happening?
Hello,
please, provide a sample that allows to reproduce the problem. editor object must always exist when it’s opened (stage 1).
Try to call mygrid.attachEvent(“onEditCell”,…) after grid was fully loaded:
mygrid.loadXML(“grid.xml”,function(){
mygrid.attachEvent(“onEditCell”,function(stage,rowId,cellInd,newValue,oldValue){
if (stage==1&&this.editor.obj&&this.editor.obj.select){
this.editor.obj.select();
}
return true;
})
});
Hello,
I tried this snippet in one of my grids :
mygrid.attachEvent(“onEditCell”, function(stage,rowId,colIndex) {
if(stage==1 && mygrid.editor && mygrid.editor.obj){
this.editor.obj
this.editor.obj.select();
}
return true
});
It’s perfectly working on Chrome and FF. But on I.E, when the cell is double-clicked, the content is selected. But if the cell is only containing spaces, the API delete those spaces and flag the line as “updated”.
Yet, the user should be able to double click the cell (and by the way select automatically the content) without modify it.
Do you have an idea to fix this wrong behavior on IE ?
Thx by advance,
Zak.
Sorry, I put the wrong snippet up there.
Here’s the good one :
mygrid.attachEvent(“onEditCell”, function(stage,rowId,colIndex) {
if(stage==1 && mygrid.editor && mygrid.editor.obj){
this.editor.obj.select();
}
return true
});
The issue is still existing,
Thx
Hello,
Does anyone have an idea about this ?
Thx,
Zak
Unfortunately the issue cannot be reconstructed locally.
Your code works correctly for us.
If issue still occurs for you - please, provide us with a complete demo where the issue can be reproduced.
Here you can find a tutorial:
docs.dhtmlx.com/doku.php?id=othe … leted_demo