views:

83

answers:

0

Hello,

Can someone please tell me why this store is not working correctly.

I have try'd with another store that is getting it's data from the server and then it is working ok.

If I have the store setup like this, it does not do columnsort anymore??

What is this store missing to get it to work???

sessieView = new Ext.list.ListView({
           store: dsSessie,
           singleSelect:true,
           emptyText: 'Geen sessiedata',
           reserveScrollOffset: true,
           columns: [{
                   header: 'ID',
                   width: .1,
                   dataIndex: 'gebruikerid'
        },{
                   header: 'Actie',
                   width: .45,
                   dataIndex: 'actie'
        },{
                   header: 'Datum',
                   width: .45,
                   dataIndex: 'moddate',
                   tpl: '{moddate:date("Y-m-d G:i")}'
                   ,align: 'right'
        }]
    });


 recSessie = Ext.data.Record.create([{
            name:'id'
            ,name:'gebruikerid'
            ,name:'actie'
            ,name:'moddate'
            ,name:'ownerid'
    }]);

    var prSessie = new Ext.data.MemoryProxy({ root:[] });

    dsSessie = new Ext.data.Store({
             reader: new Ext.data.JsonReader({
                root:"root"
                ,id: 'gebruikerid'
                },recSessie),
                proxy:prSessie
    });
    dsSessie.load();
    dsSessie.add( new recSessie({id:'2',actie:'someaction',moddate:new Date(),ownerid:'',gebruikerid:1}) );

thanks, Richard

related questions