PDA

View Full Version : h-scroll on grid with dockedItems and forceFittrue and border false



Webtel
10 Aug 2012, 1:30 AM
Hello,

Under ExtJS 4.1.1 I have problem wigh grid h-scroll. It shows up when having dockedItems and forceFit:true, and border:false.. Why so? How can i remove this scroll?



Ext.create('Ext.Window',{
autoShow:true,
width:400,
height:300,
layout:'fit',
items:[{
xtype:'grid',
forceFit:true,
border: false,
columns:[{dataIndex:'a'}],
store:Ext.create('Ext.data.Store',{fields: ['a']}),
dockedItems:[
{dock:'right',width:200,xtype:'form'}
]
}]
});


ps doComponentLayout doesnt work niether on grid nor on grid.view..

friend
10 Aug 2012, 4:15 AM
For what you're trying to do, an hbox layout is probably a better fit:



Ext.create('Ext.Window',{
autoShow:true,
width:400,
height:300,
layout: {
type: 'hbox',
align: 'stretch'
},
items:[{
xtype:'grid',
columns:[{dataIndex:'a', flex: 1}],
flex: 1,
store: Ext.create('Ext.data.Store',{fields: ['a']})
},{
xtype: 'form',
flex: 1
}]
});

Webtel
10 Aug 2012, 4:43 AM
thanks very much. ill go with it.