PDA

View Full Version : grid row listener - inline



gurpal2000
4 Mar 2010, 2:49 PM
I've seen code something like this where grid has been defined elsewhere.



grid.on('rowclick', function(grid, rowIndex, e) {
// blah
}


How do you declare the rowclick listener as a config/attribute in the declared grid var? ie. not a separate statement like this?



var grid = blah({
// blah
listener: {
onrowclick: {
// blah
}
}
});


could this be right? any sample code?
/newbie

Animal
4 Mar 2010, 10:26 PM
http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.GridPanel

The docs are full of example code.

As is the examples directory of your SDK.

gurpal2000
5 Mar 2010, 12:08 AM
http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.GridPanel

The docs are full of example code.

As is the examples directory of your SDK.

yup found it out quickly

thx