Search code examples
javascriptextjsgridpanel

Add help button to Extjs gridpanel header


I want to add a button to the right hand side of my gridpanel header but can't find anyway of doing so.

I don't want to add a toolbar since it's only 1 button I want to add.


Solution

  • Check out the panel's tools config. Simply add it to grid's config:

    Ext.create('Ext.grid.Panel', {
        // ...
        tools:[
        {
            type:'help',
            tooltip: 'Get Help',
            handler: function(event, toolEl, panel){
                // show help here
            }
        }],
        // ...
    });
    

    Here is demo.