View Full Version : [CLOSED] Event Handler for click on "Group By this Field"?

Sep 08, 2017, 3:34 PM
Hi support,

We need event handler at grid panel ,
When we click on the "Group By this field " at grouping of grid panel.
Please check attachment for better understanding.

Thank You,

Sep 09, 2017, 3:49 AM
Hello @iansrilley!

There's no specific event (not exported as an event at least) to customize the grid header menu entry click.

You can use the store's groupChange event to trigger an action not only when the menu entry is hit, but anytime the grouping is changed.

But if you need it to be exclusively triggered when the menu entry is chosen, and don't have a pattern to test the groupChange event above, you then would need to tamper in the feature and add your own code, calling the original code either before or after your custom code execution. Something like this:

Ext.define('Ext.grid.feature.Grouping', {
override: 'Ext.grid.feature.Grouping',
onGroupMenuItemClick: function (menuItem, e) {
var me = this;


console.log("Menu item click.");

I hope this helps!

Sep 22, 2017, 10:01 PM
Hello @iansriley!

It's been a while since we replied your inquiry here and still no feedback from you. Did the response above help at all? Do you still need help with this issue? Please let us know so we can further help you.

We may mark this thread as closed if you do not reply in 7+ days from now, but that's not going to prevent you from posting follow-ups here when you feel fit.

We're looking forward to your feedback!