PDA

View Full Version : grid with searchplugin surrounded by vbox layout



giraffezw
21 Mar 2011, 3:25 AM
I have probelms to use the vbox layout in connection with a grid which contains a search plugin


{
xtype: 'panel'
,id:'id1'
,layout: {
type:'vbox'
,align:'stretch'
}
,title: "test"
,border: false
,items: [{
xtype: 'formWithFields'
,flex: 0
,autoHeight: true
,id: 'fid1'
,url: 'path/to/..'
,storeId :'fstoreid1'
,hidden_exx_type: this.id
},{
xtype: 'eGrid'
,flex: 1
,id: 'gid2'
,url: 'path/to/..'
,root: 'gid2'
,storeId :'gstoreid2'
}]
}
and here is the grid:


Ext.company.eGrid = Ext.extend(Ext.grid.GridPanel, {
url: ''
,root: ''
,id: ''
,storeId:''
,title: ''
,forceLayout:true
,loadMask: true
,initComponent:function() {
Ext.apply(this,{
store: new Ext.data.GroupingStore({
storeId:this.storeId
,proxy: new Ext.data.HttpProxy({
url: this.url
,method: 'GET'
})
,reader: new Ext.data.JsonReader({
root: ''
,totalProperty: ''
,fields: [
//...
]
})
,sortInfo:{field:'created_at',direction:'DESC'}
,remoteSort: false
})
,columns: [
//...
]
,view: new Ext.grid.GridView({
autoFill: true
,forceFit:true
})
,bbar: new Ext.PagingToolbar({
pageSize: Config.Grid.getLimitParam()
,store: Ext.StoreMgr.get(this.storeId)
,displayInfo: true
,displayMsg: 'Ergebnis {0} - {1} von {2}'
,emptyMsg: "Keine Ergebnisse gefunden"
})
,plugins: new Ext.ux.grid.Search({
mode:'local'
,iconCls: false
,dateFormat:'m/d/Y'
,minLength:2
,width: 200
})
});
Ext.company.eGrid.superclass.initComponent.apply(this, arguments);
} // eo function initComponent

,onRender:function() {
Ext.company.eGrid.superclass.onRender.apply(this, arguments);
} // eo function onRender

,afterRender:function() {
Ext.company.eGrid.superclass.afterRender.apply(this, arguments);
var bottomtoolbar = this.getBottomToolbar();
bottomtoolbar.add('->',{
text: 'Liste drucken'
,qtip:'Liste drucken für aktuelle Seite'
,iconCls:'icon-grid-print'
,scope:this
,width: 150
,handler: function(){
Ext.ux.GridPrinter.print(this);
}
});
} // eo function afterRender

});

Ext.reg('eGrid', Ext.KV73.ePartialGrid);
if the grid is not surrounded by a vbox layout then everything works. Is there a known problem/bug? did i miss something.

the plugin pushes over the right border even if i use a fix with at the grid