PDA

View Full Version : Grid only showing one column



loadbrain
24 Jul 2009, 7:52 AM
Hello
here is my code for a Grid, only the subscribe_date column is shown, do not know why, any help, I think I am blind....
Thanks!!!



/**
* Subscriber record descriptor.
* subscriber_id user_id subscriber_name subscriber_email confirmed subscribe_date
*/
var subscriberRecord = Ext.data.Record.create([
{ name : "subscriber_id", mapping : "subscriber_id" },
{ name : "user_id", mapping : "user_id" },
{ name : "subscriber_name", mapping : "subscriber_name" },
{ name : "subscriber_email", mapping : "subscriber_email" },
{ name : "confirmed", mapping : "confirmed" },
{ name : "subscribe_date", mapping : "subscribe_date" }
]);

/**
* Subscriber data store.
*/
var subscriberStore = new Ext.data.JsonStore({
url: './classes/subscribers.functions.php?task=getSubscribers',
storeId: 'subscriberStore',
autoLoad: true,
// reader configs
root: 'subscribers',
idProperty: 'subscriber_id',
fields: ['subscriber_id', 'user_id', 'subscriber_name', 'subscriber_email', 'confirmed', 'subscribe_date']
});

/**
* Subscriber column model.
*/
var subscriberColumnModel = new Ext.grid.ColumnModel(
[
{
header: 'subscriber_id', width: 20, dataIndex: 'subscriber_id',
header: 'user_id', width: 20, dataIndex: 'user_id',
header: 'subscriber_name', width: 100, dataIndex: 'subscriber_name', id: 'subscriber_name',
header: 'subscriber_email', width: 200, dataIndex: 'subscriber_email',
header: 'confirmed', width: 20, dataIndex: 'confirmed',
header: 'subscribe_date', width: 50, dataIndex: 'subscribe_date'
}]
);

/**
* subscriber Grid Panel
*/
var subscriberGridPanel = new Ext.grid.GridPanel({
id: 'subscriberGridPanel',
store: subscriberStore,
cm: subscriberColumnModel,
width: 500,
height: 'auto',
title: 'Subscribers',
autoExpandColumn: 'subscriber_name',
sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
width: 'auto',
height: 600,
viewConfig: {
forceFit: true
},
frame: true,
title: 'Abonnenten verwalten',
});

MD
24 Jul 2009, 8:13 AM
width: 500,
height: 'auto',
title: 'Subscribers',
autoExpandColumn: 'subscriber_name',
sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
width: 'auto',
height: 600,

???

loadbrain
24 Jul 2009, 9:00 AM
Ok, I removed the duplicated entries, but that did not change a thing....
Or what did you want to tell me????