Hi, is there any way to get the value selected when edit, i mean, when i give double click on a cell, and this cell is going to be edited, i need that the actual value of the cell appears like selected by the mouse, i have the next code
function calculateFooterValues(stage,id,ind){
if (stage==0){
oldvalue=mygrid.cells(id,2).getValue();
}
if(stage==2){ //SOMETHIG HERE, WHEN STAGE==2
if (isNaN(mygrid.cells(id,2).getValue())){
alert (“Error”);
mygrid.cells(id,2).setValue(oldvalue);
return true;
}
if ((mygrid.cells(id,2).getValue()%1)>0 || (mygrid.cells(id,2).getValue<1) || (mygrid.cells(id,2).getValue==’’)){
alert (“Error”);
mygrid.cells(id,2).setValue(oldvalue);
return true;
}
if (mygrid.cells(id,2).getValue()<1){
alert (“Error en la cantidad”);
mygrid.cells(id,2).setValue(oldvalue);
return true;
thanks in advance for your reply
You can use:
mygrid.attachEvent(“onEditCell”,function(stage,rowId,cellIndex){
if (stage==1){
var c=this.editor.obj;
c.select();
return true;
}
return true;
});
Thanks in advance for your reply, now works fine.
Greetings.