PDA

View Full Version : Toolbar is not shown



noimehl
4 Oct 2010, 10:32 PM
Hi,

I have create a toolbar wihtin a EditorGridPanel within a TabPanel. The data are indicated, but not the toolbar.
Only if of the tab is changed, the toolbar will be shown.

Why and how i can fix them?

regards
noimehl

Condor
5 Oct 2010, 1:07 AM
You probably misconfigured your layout.

I could check if you posted the layout code you are using for the tabpanel and grid.

noimehl
5 Oct 2010, 2:01 AM
Hi condor,

here is my code for teh tabpanel :

new Ext.TabPanel({
plain: true,
activeTab: 0,
defaults: {
autoHeight: true
},
record: record,
items:[
{title: '‹bersicht',
xtype: 'taskuser'}
]
})


and for the grid:


Example.Grid = Ext.extend(Ext.grid.GridPanel, {
initComponent:function() {

...

var config = {
store: jtaskuserstore,
sm: checkboxSel,
columns:[
checkboxSel
,{id:'tuid',header: "ID", sortable: true, dataIndex: 'id',hidden: true}
,{header: "Mitarbeiter", sortable: true, dataIndex: 'fullname'}
,{header: "Soll h", sortable: true, dataIndex: 'sollh', renderer: RedGreen}
,{header: "Ist h", sortable: true, dataIndex: 'isth', renderer: RedGreen}
,{header: "Onhold h", sortable: true, dataIndex: 'onholdh', renderer: RedGreenOnhold}
,{header: "Start", sortable: true, dataIndex: 'start', renderer: Ext.util.Format.dateRenderer('d.m.Y')}
,{header: "Ende", sortable: true, dataIndex: 'ende', renderer: Ext.util.Format.dateRenderer('d.m.Y')}
,{header: "Stand", sortable: true, dataIndex: 'stand', renderer: renderStand}
,{header: "Erl", sortable: true, dataIndex: 'png', renderer: renderIcon }
]
,viewConfig:{forceFit:true}
,loadMask: true
,waitMsg:'Loading...'
,tbar: { items: [
{ iconCls:'btn-add',
scale: 'medium',
handler: function() {
// add
}
}, ...
]}
}; // eo config object



// store load
jtaskuserstore.load();

// apply config
Ext.apply(this, Ext.apply(this.initialConfig, config));

// call parent
Example.Grid.superclass.initComponent.apply(this, arguments);


regards
noimehl

Condor
5 Oct 2010, 3:28 AM
You don't want an autoHeight:true grid!

Remove the tabpanel defaults and give the tabpanel a fixed height (either specified or from it's container layout).