PDA

View Full Version : button link in second toolbar



tdikarim
19 Apr 2011, 3:36 AM
Hi All,

Hi try to place a button link (for save the grid in excel with the Exporter plugin).
If I place it in in the bottom toolbar all work fine. But if I place it in a second toolbar an error appear.


//Create the Download button and add it to the top toolbar
var exportButton = new Ext.ux.Exporter.Button({
component: grid,
text : "Download as .xls"
});
var toolBarOption = Ext.getCmp('bbarOption_id');
toolBarOption.add(exportButton);
toolBarOption.render();


//grid.getBottomToolbar().add(exportButton); //<<-- This works fine


//---create the second toolbar
var bbarOption = new Ext.Toolbar({
id:'bbarOption_id',
renderTo: grid.bbar,
items : ['<B>Tools</B> :'
, '-'
]
});



the error is next
this.getEl() is undefined
[Break On This Error] this.getEl().child('a', true)....ction](this.component, null, config); in Exporter-all.js (line 157)

When I debug I see this.El des not exist !

Thanks for your Help