onRowDblClicked

Hi,



we have an on row double click event on a treegrid - the tree is the only column



when a folder is opened and closed quickly it triggers the row double click event but of course we dont want it to trigger this event if they are opening and closing folders - only when they are double clicking on the item itself



is there a way around this



thanks



richard

The double event detection is done on native level ( it occurs only when browser itself generate doubleclick event ) so it pretty hard to resolve situation.
The most simple solution is to use some kind of flag to skip not necessary clicks , for example

grid.attachEvent(“onOpen”,function(){

    //occurs when item opened

    this._myflag=(new Date()).valueOf();

    return true;

});

grid.attachEvent(“onRowDblClicked”,function(){

    //occurs when row dbl clicked

    if (this._myflag && (this._myflag+500) > (new Date()).valueOf()) return true;

    …any dbl click related code here…

});


described check will skip dblclick action if there is lesser than half of second between item opening and second click , that must effectively solve your problem.

hi

very clever solution!

thanks