Cell Edition -- Revert Changes Possible ?? .....
Although the mentioned ( possible bug ?? ) in Moz/FF with the line:
obj.raiseEvent("editCurrentCell", {}, col, row);
/javascript.forum.13363.3/setting-focus-on-a-cell.html
It is OK in IE, but i can not get the desire results on this.
note: What i am trying is not leave (re-enter) edition untill pass validation.
issue: double-click on a different cell ( while editing) broke my test.
Is there a better way to arcieve it ?? ( I admit I'm missing the point )
8-) Thanks
obj.raiseEvent("editCurrentCell", {}, col, row);
/javascript.forum.13363.3/setting-focus-on-a-cell.html
It is OK in IE, but i can not get the desire results on this.
note: What i am trying is not leave (re-enter) edition untill pass validation.
issue: double-click on a different cell ( while editing) broke my test.
Is there a better way to arcieve it ?? ( I admit I'm missing the point )
8-) Thanks
var lastText;
obj.onCellEditStarted = function(event, column, row){
lastText = this.getCellText(column,row);
}
obj.onCellEditEnded = function(text, col, row){
if(obj.getCellText(col,row)== "validvalue" ){}
else{
if(text != lastText ){
if (confirm("VALIDATION ERROR !! -- Revert Changes to ?" + lastText + ' ' + col + ' ' + row)){
obj.setCellText(lastText,col,row);
obj.raiseEvent("editCurrentCell", {}, col, row);
}
else{ obj.raiseEvent("editCurrentCell", {}, col, row);}
}
}
} ;
Carlos
April 13,