PDA

View Full Version : List View not rendering properly



vishalnnsingh
5 Jan 2011, 2:15 AM
My list view is not rendering properly. Can anyone tell me why.

var portSelectList = new Ext.list.ListView({
store:portListStore,
anchor:'95%',
multiSelect:true,
title:'Select Port',
reserveScrollOffset: true,
columns:[
{
header:'Date',
dataIndex:'date',
width:0.4
},
{
header:'Port',
dataIndex:'port',
width:0.5
}
]
});

var dorForm = new fm.FormPanel({
title: 'DOR',
bodyStyle: 'padding:5 5;',
height: 375,
frame: true,
labelAlign:'top',
labelWidth: 50,
items: [
{
layout:'column',
items:[
{
layout:'form',
columnWidth:0.4,
items:[
{
xtype: 'datefield',
fieldLabel: 'Date',
anchor: '95%'
},
{
xtype: 'combo',
fieldLabel: 'Port',
anchor: '95%'
},
{
height:15
},
{
layout:'column',
items:[
{
layout:'form',
columnWidth:0.2,
items:[
]
},
{
layout:'form',
columnWidth:0.3,
items:[
{
xtype: 'button',
text: 'Add Port'
}
]
},
{
layout:'form',
columnWidth:0.5,
items:[
]
}
]
},
{
height:10
},
portSelectList
]
},
{
layout:'form',
columnWidth:0.6,
items:[physGrid]
}
]
}
]
});

vishalnnsingh
5 Jan 2011, 2:48 AM
24104

Condor
7 Jan 2011, 4:03 AM
1. Overnested: The form should be layout:'column' so you no longer need that extra layout:'column' panel.
2. The layout:'column' panel for the Add Port button doesn't have a width. Make it anchor:'95%'.
3. I really dislike anchor:'95%'. Doesn't it look better when you use anchor:'-20'?
4. The listview needs to be autoHeight:true.

What exactly is wrong with the screenshot?

vishalnnsingh
7 Jan 2011, 4:10 AM
I used paint to crop the image :), Thanks for replying making the changes now.