Results 1 to 3 of 3

Thread: Grid only showing one column

  1. #1

    Default Grid only showing one column

    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!!!

    Code:
    /**
     * 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',
    });

  2. #2
    Sencha User MD's Avatar
    Join Date
    Mar 2007
    Posts
    178

    Default

    Code:
        width: 500,
        height: 'auto',
        title: 'Subscribers',
        autoExpandColumn: 'subscriber_name',
        sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
        width: 'auto',
        height: 600,
    ???

  3. #3

    Default

    Ok, I removed the duplicated entries, but that did not change a thing....
    Or what did you want to tell me????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •