3
votes

has anybody had the need to add an extra button to the grid panel header menu(sorting\columns)? potentially I would like to add another button to the menu that resets to the default columns model. I can accomplish this using Jquery but I was wondering if there is an EXTjs way to do it.

Thanks

1

1 Answers

4
votes

You need to dig through the source to see it's there, but a GridPanel has a view property which is its GridView which in turn has a hmenu property which is the menu it shows when you click on one of those column headers.

So, with a GridPanel called gridpanel (once it's rendered) you can do the following:

gridpanel.view.hmenu.add({
  text: 'reset',
  handler: function() {
    // reset magicks
  }
});