Quote Originally Posted by dlogic View Post
Hi Bob,

Sorry I'm still struggling (I think due to my lack of knowledge). My view is based on the MVC example supplied with the Grid extension and calls the data using a proxy. I'm not sure where to add the xtype for buttonlist. My code is:

Code:
Ext.define('PlayerAdmin.view.SessionDetails', {    extend: 'Ext.navigation.View',
    xtype:  'sessiondetails',
    requires: [
        'Ext.grid.List',
        'Ext.grid.ButtonsGrid',
        'Ext.grid.feature.Sorter'
    ],
    initialize: function() {


        // get the data object that hold the current active player        
        var dataObj             =  this.dataObj;        


        if (dataObj) {
            var playerName      =  dataObj.get('playerName'),
                playerId        =  dataObj.get('id'),
                sessionId       =  dataObj.get('sessionID'),                      
                visitID         =  dataObj.get('visitID'),
                tableType       =  dataObj.get('tableType');
        }; 


        // update top toolbar with correct title
        var mainToolbar = Ext.getCmp('mainToolbar');
        mainToolbar.setTitle('Session Details: '+playerName);


        // hide start session button
        Ext.getCmp('statSessionButton').hide();
        Ext.getCmp('clubName').hide(); 
        Ext.getCmp('backButton').show(); 


        // get panel ID to set mask       
        var panel           = Ext.getCmp('ext-viewport');




        var model = Ext.define('SessionDetails', {
            extend : 'Ext.data.Model',


            config : {
                fields : [
                    'type',
                    'amount',
                    'note',
                    'date',
                    'void',
                    'actions'
                ],
                proxy : {
                    type        : 'ajax',
                    url         : 'app/ajax/sessionDetailsAjax.php',
                    reader      : {
                        type           : 'coljson',
                        rootProperty   : 'data',
                        columnProperty : 'columns'
                    },
                    extraParams : {
                        sessionId:        sessionId,
                    }
                }
            }
        });        


        var store = Ext.create('Ext.data.Store', {
            autoLoad  : true,
            model     : model,
            pageSize  : 5,
            listeners : {
                load : function(store) {
                    var proxy   = store.getProxy(),
                        reader  = proxy.getReader();
                        //columns = reader.getColumns();


                    //grid.setColumns(columns);


                    var panel           = Ext.getCmp('ext-viewport');// get viewport
                    panel.unmask(); // remove loading mask  
                }
            }
        });


        var grid = Ext.create('Ext.grid.List', {
            fullscreen : true,
            width:          '100%',
            height:         '100%',
            store      : store,
            columns  : [
                {
                    header    : 'Type',
                    dataIndex : 'type',
                    style     : 'padding-left: 1em;',
                    width     : '16.6%',
                    filter    : { type : 'string' }
                },
                {
                    header    : 'Amount',
                    dataIndex : 'amount',
                    style     : 'text-align: center;',
                    width     : '16.6%',
                    filter    : { type : 'numeric' }
                },
                {
                    header    : 'Note',
                    dataIndex : 'note',
                    style     : 'text-align: center;',
                    width     : '16.6%',
                },
                {
                    header    : 'Date',
                    dataIndex : 'date',
                    style     : 'text-align: center;',
                    width     : '20%',
                },
                {
                    header    : 'Void',
                    dataIndex : 'void',
                    style     : 'text-align: center;',
                    sortable  : false,
                    width     : '10%'
                },


            ]            
        });




        this.add([grid]);   


    },
    config: {                        
        navigationBar: {
            hidden: true
        },                  
    } 
});

I am having the same problem as you. Have you got the solution to your question?