PDA

View Full Version : Array Grid error



EugenE
21 Aug 2007, 10:24 AM
Hey Guys

need help i'm trying to create a Grid from an Array put something is wrong^^

here the code:
[php]/* Versionen Informationen */
var VcolModel = new Ext.grid.ColumnModel([
{
id: 'vers',
header: "Version",
dataIndex: 'vers',
width:150,
editor: new Ed(new fm.TextField({
allowBlank: false
}))
},
{
header: "Datum",
dataIndex: 'date',
//renderer: formatDate,
width:150,
editor: new Ed(new fm.TextField({
allowBlank: false
}))
},
{
header: "Status",
dataIndex: 'status',
width:150,
editor: new Ed(new fm.TextField({
allowBlank: false
}))
},
{
header: "Beschreibung",
dataIndex: 'info',
editor: new Ed(new fm.TextField({
allowBlank: false
}))
}
]);
VcolModel.defaultSortable = false;

var VInfo = Ext.data.Record.create([
{name: 'vers'},
{name: 'date', type: 'date', dateFormat: 'm/d/Y'},
{name: 'status'},
{name: 'info'}
]);

var VgridData = [
['0.1','01/01/06','feddich','jop'],
['0.2','01/01/06','feddich','jop']
];

VdataStore = new Ext.data.Store({
proxy: new Ext.data.MemoryProxy(VgridData),
reader: new Ext.data.ArrayReader({}, [
{name: 'vers'},
{name: 'date'},
{name: 'status'},
{name: 'info'}
])
});

//dataStore.loadData([['Test','Aha'],['Ben','wser?!']],true);
//um neue Daten hinzuzuf

EugenE
21 Aug 2007, 10:24 AM
oh sry wrong board, pls move this thread -.-*

sry :((