:: Forum >>

Cell Edition -- Revert Changes Possible ?? .....

Although the mentioned ( possible bug ?? ) in Moz/FF with the line:
obj.raiseEvent("editCurrentCell", {}, col, row);
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" ){}
if(text != lastText ){
if (confirm("VALIDATION ERROR !! -- Revert Changes to ?" + lastText + ' ' + col + ' ' + row)){
obj.raiseEvent("editCurrentCell", {}, col, row);
else{ obj.raiseEvent("editCurrentCell", {}, col, row);}
} ;
Thursday, April 13, 2006
Sorry, seems to be something wrong in my code ( not sure what) ???,
It's working fine now, just a small issue ( but not a big problem), if double-click in a cell ( but not on current selected one) the edition is open in the selected instead of the new d-c one ?
Thursday, April 13, 2006
And also the only way to leave edition is by single-click on another cell (but not dbl-click) ??
Well not too bad, but wondering about user clicks-interaction when editing validated or not-V mixed cells.
Thursday, April 13, 2006

for validation it might be better using onCellValidating and onCellValidated events.


There is an example in /examples/new/editing.htm which shows how to use onCellValidating event - if you return non-zero value (error message) then the focus will stay in the cell.
Alex (ActiveWidgets)
Thursday, April 13, 2006
Thanks Alex, I tried that before this test ,but I was not able to make the revert-value plus maitain edit-focus works with onCellValidating/ed events.

i.e : obj.setCellText(lastText,col,row);

So I tried the onCellEditEnded event. Sorry if I am missing something simple , (as I said before my point today is a little....).
Could you Please (nothing urgent) show a small test-sample with this events to make both things work ??
Thursday, April 13, 2006

This topic is archived.

Back to support forum

Forum search