Add help button to Extjs gridpanel header

pm13 picture pm13 · Sep 14, 2011 · Viewed 7.6k times · Source

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.

Answer

Molecular Man picture Molecular Man · Sep 14, 2011

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.