3.2.0

Detect when in edit mode

I'm trying to disable the backspace button when it's not being used to edit the grid. This code should work pending my ability to fill in the if statement -
obj.onKeyBackspace = function(event){
        // if not in edit mode, cancel the backspace       
        if(/* not in edit mode */)
        {
            event.cancelBubble = true;
            event.returnValue = false;
        }
    }


How can I detect whether or not I am in edit mode? Thanks in advance!
Chris
June 29,
if(obj.getCellEditable(column, row)) {

}

Check examples first, tkz.
Paulo Cesar Silva Reis (PC from Brazil).
June 29,
This returns whether or not the cell has the capability of being in edit mode, but not whether it is actually IN edit mode at the moment... Is there a way of detecting once you have actually entered edit mode?
Chris
June 29,
There is no public property to indicate editing state yet but you can track onCellEditStarted and onCellEditEnded events to set and clear your own editing state flag. Internally I am using obj.$edit but this may change in the future.
Alex (ActiveWidgets)
June 29,

This topic is archived.

See also:


Back to support forum