:: Forum >>

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
Thursday, June 29, 2006
if(obj.getCellEditable(column, row)) {

}

Check examples first, tkz.
Paulo Cesar Silva Reis (PC from Brazil).
Thursday, June 29, 2006
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
Thursday, June 29, 2006
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)
Thursday, June 29, 2006

This topic is archived.


Back to support forum

Forum search