PDA

View Full Version : How do you trap event on a grid summary row?



lrayman
10 Jun 2013, 1:27 PM
I have a grid with the grouping summary feature enabled. I want to trap click events on the summary rows.

I've tried many variations of the following in my controller, with no luck:



init: function () { this.control({
'myGrid .x-grid-row-summary .x-grid-cell' : { click : this.onMyGridSummaryClick }
});
}


any ideas>

slemmon
11 Jun 2013, 9:33 PM
I think you'd do best to listen to the grid's viewready event and in that do something like the following:



viewready: function () {
this.mon(this.getEl().down('.x-grid-row-summary'), 'click', function () {
console.log('clicked summary row');
});
}