Cell focusing 2

I get an error when I call grid.selectCell(rIn, cIn, false, false, true) on stage == 2



I created a function that is onCellValueChanged where



if(stage == 0)

    return true;

else if(stage == 1)

    

else if(stage == 2) {

    I want to validate the cell val and keep focusing on it ifI the cell value is not right

}

Is there a simple way to do it?



Thanks



Yan

There is no way to prevent closing editor from onEditCell event , but it possible to reopen it if value is not valid
mygrid.attachEvent(“onEditCell”,function(stage,id,ind,value){
    if(stage == 2) {

        if (some_check(value))
            window.setTimeout(function(){
                mygrid.selectCell(mygrid.getRowIndex(id),ind,false,false,true);
            },1);  
    }

    return true;
});