PDA

View Full Version : Grids not getting correct information



visualinventor
16 Oct 2007, 6:53 AM
I have a tab panel with four grids, all grids are using the same column model but different datastores. But for some reason the grid is not displaying the correct information. Here is my code:



this.dsForum = new Ext.data.Store(
{
proxy: new Ext.data.HttpProxy({url: '/iUpdate/index.php?mod=say&action=getForumXml'}),
reader: new Ext.data.XmlReader(
{
record: 'item',
id: 'id',
totalRecords: 'itemCount'
},
[
'id', 'content', 'movie_id', 'active',
{name:'publish_date', mapping: 'publish_date', type:'date',dateFormat: 'Y-m-d H:i:s'},
{name:'username',mapping:'user > username'}
]
)
}
);

column model:


var cm = new Ext.grid.ColumnModel(
[
{
header: 'Publish Date',
width: 100,
sortable: false,
dataIndex: 'publish_date',
renderer: Ext.util.Format.dateRenderer('m/d/Y'),
editor: new ed(new fm.DateField({
format: 'Y-m-d H:i:s',
minValue: '2006-01-01 00:00:00'
}))

},
{
header: 'Movie',
sortable: true,
dataIndex: 'movie_id'
},
{
header: 'Title',
sortable: true,
dataIndex:'name'
},
{
header: 'Content',
width: 100,
sortable: false,
dataindex: 'content'
},
{
header: 'Posted By',
width: 100,
dataindex: 'username',
renderer: invalid
},
{
header: 'Approved',
width: 50,
dataIndex: 'active'
}
]
);


If anyone sees any issues please let me know.

visualinventor
16 Oct 2007, 7:36 AM
Nevermind, i found the issue. I had dataindex rather than dataIndex.