Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Feb 02, 2009 11:28
open dhtmlx forum
onTab event not working

Hello,

I want to use onTab event for grid. I am using Release 2 build 80512.

mygrid.attachEvent("onTab",function(){
//do stuff
});

But the code inside onTab never executed. Did release 2 inluded onTab event ?

Thanks.
Answer posted by Support on Feb 03, 2009 02:31
>> I am using Release 2 build 80512.
Event doens't not exist in this version ( it was added in dhtmlxgrid 2.0 build 81009 )
If by some reason you can't update to latest codebase, you can add the next code to the grid's init, to add event in your version of grid. 

grid._key_events.k9_0_0=function(){
            this.editStop();
            if (!this.callEvent("onTab",[true])) return true;
            var z = this._getNextCell(null, 1);
    
            if (z){
                this.selectCell(z.parentNode, z._cellIndex, (this.row != z.parentNode), false, true);
                this._still_active=true;
            }
        }