PDA

View Full Version : Where is OnFocus() for editor grid cells?



derekc
20 Sep 2010, 6:49 AM
I'm trying to fire some code onFocus and onBlur for textfields in an editor grid. There are events setup for afteredit, onclick, etc that come close doing what I need... do I need to define onFocus() and onBlur() events myself and use grid.addEvents() to register them?

Am I just blind? please help.

Thanks,
Derek

derekc
20 Sep 2010, 8:32 AM
yup, was just blind.

using
beforeedit: function(e) {
/*grid, record, field, value, row, column,cancel */ }

is comparable to onFocus() ... now to figure out how to get the absolute position of the cell that fired the event.

derekc
20 Sep 2010, 10:33 AM
And the answer is:



beforeedit: function(e) {
var cell = Ext.get(e.grid.getView().getCell(e.row, e.column))
//cell.getX()
//cell.getY()
}