There is an Editor grid panel.
I am trying to add a listener to the cell click event. I have tried to do it in different ways:
gridPanel.addListener('cellclick',myfunction);
inside the grid:
listeners: {
cellclick: myfunction
}
I have tried to do it in the selectionModel object.
None of them worked.
Where can be the problem?
If you can’t add the listener as a config parameter, it’s probably because you’re having problems with the callback function not being in scope, similar to this:
In the first line,
thiswas still referring to the global (read: window) object at the time the object was defined. Sothis.sayHi === window.sayHi === undefined. The same thing happens when you define Ext config objects. Try defining the callback inline:Other options: