PDA

View Full Version : Grid with CheckBox inside a FormPanel



marco76
5 Feb 2008, 12:43 AM
I would insert a grid with CheckBox in a formPanel.
Now in FF all works fine in IE the grid have resize problem
My code (simil to FeedViewer):
Code:

var prova=new FeedGrid(this, {});
var tab=new Ext.FormPanel(

{
title:'Item 2', border:false,
autoWidth:true,
items:[
{ border:false,
xtype:'tabpanel', activeTab:0, items:[
{
title:'GRIGLIA',
layout:'fit',
id:'griglia',
items:prova
}
]
}
]
}
);


mainPanel.add(tab);

Condor
5 Feb 2008, 12:48 AM
Your formpanel should also have layout:'fit'.

ps. If you put fields on different tabs inside a formpanel you should use deferredRender:false on the tabpanel.

marco76
5 Feb 2008, 12:55 AM
I have set layout:'fit'
I use deferredRender:false but the problem is not solved.
If I use Panel instead that FormPanel all works

Condor
5 Feb 2008, 12:57 AM
Also remove autoWidth:true.

If this doesn't work, post your corrected code here again (and use [ CODE ] [ /CODE ] tags!).

marco76
5 Feb 2008, 1:14 AM
My code
mainpanel is the same class of FeedViewer example a region with x-type=tabpanel


var store = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: '/xml/list/'
}),

reader: new Ext.data.XmlReader(
{record: 'informazione',id: information_key},
['informazione_id','nome', 'autore','tipo_id', {name:'created', type:'date',dateFormat: 'Y-m-d H:i:s'},'stato','tipo_nome']
)
});





var prova=new Ext.grid.GridPanel({
store:store,
columns: [
{header: "Author", width: 110, dataIndex: 'Author', sortable: true},
{header: "Title", width: 120, dataIndex: 'Title', sortable: true},
{header: "Manufacturer", width: 105, dataIndex: 'Manufacturer', sortable: true},
{header: "Product Group", width: 100, dataIndex: 'ProductGroup', sortable: true}
],
viewConfig: {
forceFit:true
},
id:'grid-panel1',
border:false
});






var tab=new Ext.FormPanel(

{
title:'Item 2',
layout:'fit',
border:false,
items:[
{
border:false,
xtype:'tabpanel',
deferredRender:false,
activeTab:0,
items:[
{
title:'GRIGLIA',
layout:'fit',
id:'griglia',
items:prova
},
{
title:'DATI',
html:'asdasd asd asd asd '
}

]
}
]
}
);

mainPanel.add(tab);

marco76
5 Feb 2008, 1:24 AM
I have change the code inside MainPanel class with this abd the problem is the same
if I use a formpanel . If I use a panel all works fine

[CODE]
MainPanel.superclass.constructor.call(this, {
id:'main-tabs',
xtype:'tabpanel',
activeTab:0,
region:'center',
margins:'5 5 5 0',
resizeTabs:true,
tabWidth:150,
minTabWidth: 120,
deferredRender:false,
enableTabScroll: true,
layoutOnTabChange: true,
plugins: new Ext.ux.TabCloseMenu(),
items: [{
id:'main-view-info',
layout:'border',
title:'Lista Unit