1. #1
    Touch Premium Member
    Join Date
    Sep 2011
    Posts
    9
    Vote Rating
    0
    ilmcon is on a distinguished road

      0  

    Default Unanswered: Grid menu not showing

    Unanswered: Grid menu not showing


    Hi,

    i have the following Panel with 1 simple grid on it

    Code:
    Ext.define('Ic.view.demo.locking', {    extend: 'Ext.panel.Panel',
    
    
        height: 100,
        minHeight: 300,
        resizable: false,
        closable: true,
        collapsed: false,
        title: 'My Panel',
    
    
        initComponent: function() {
            var me = this;
    
    
            Ext.applyIf(me, {
                tools: [
                    {
                        xtype: 'tool',
                        handler: function(target, owner, tool) {
                            var parent = tool.findParentByType(this.title);
                            parent.minimize();
                        },
                        type: 'minimize'
                    }
                ],
                listeners: {
                    added: {
                        fn: me.onPanelAdded,
                        scope: me
                    },
                    beforeadd: {
                        fn: me.onPanelBeforeAdd,
                        scope: me
                    },
                    beforeshow: {
                        fn: me.onPanelBeforeShow,
                        scope: me
                    }
                },
                items: [
                    {
                        xtype: 'gridpanel',
                        frame: false,
                        height: 300,
                        id: 'lockingDemoGrid',
                        margin: 10,
                        width: 300,
                        autoScroll: true,
                        title: 'Demo Grid',
                        titleCollapse: false,
                        columnLines: true,
                        enableLocking: true,
                        columns: [
                            {
                                xtype: 'gridcolumn',
                                dataIndex: 'stringy',
                                locked: true,
                                menuDisabled: true,
                                text: 'String'
                            },
                            {
                                xtype: 'numbercolumn',
                                dataIndex: 'number',
                                text: 'Number'
                            },
                            {
                                xtype: 'datecolumn',
                                dataIndex: 'date',
                                text: 'Date'
                            },
                            {
                                xtype: 'gridcolumn',
                                dataIndex: 'fill',
                                text: 'MyColumn16'
                            }
                        ],
                        listeners: {
                            afterrender: {
                                fn: me.onGridpanelAfterRender,
                                scope: me
                            },
                            sortchange: {
                                fn: me.onLockingDemoGridSortChange,
                                scope: me
                            }
                        }
                    }
                ]
            });
    
    
            me.callParent(arguments);
        },
    
    
    
    
        onGridpanelAfterRender: function(abstractcomponent, options) {
            Ext.define('TestModel123', {
                extend: 'Ext.data.Model',
                fields: [
                {name: 'stringy', type: 'string'},
                {name: 'number',  type: 'string'},
                {name: 'date',       type: 'string'},
                {name: 'fill',  type: 'string'}
                ]
            });
            var store = Ext.create('Ext.data.Store', {
                model: 'TestModel123',
                sorters: ['stringy','number','date'],
                data:[
                {stringy:"Michael", number:"1", date:"01/10/2004",fill:'Na klar'},
                {stringy:"Conan", number:"1", date:"01/10/2004",fill:'Na klar'},
                {stringy:"Xena", number:"2", date:"01/10/2004",fill:'Na klar'},
                {stringy:"Jim Knopf", number:"2", date:"01/10/2004",fill:'Na klar'},
                {stringy:"Superman", number:"3", date:"01/10/2004",fill:'Na klar'},
                {stringy:"Batman", number:"3", date:"01/10/2004",fill:'Na klar'}
                ]
            });
            Ext.getCmp('lockingDemoGrid').bindStore(store);
            Ext.getCmp('lockingDemoGrid').getView().refresh();
            console.log(Ext.getCmp('lockingDemoGrid'));
    
    
        },
    });
    Now my problem. Normally there should be a button the gridpanel header, but there is nothing
    Unbenannt.png

    that is how it looks. Maybe somebody could help me with this? thx in advance

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,470
    Answers
    442
    Vote Rating
    202
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    Using your code I got the result below. Are you seeing what you were hoping to see from your code snippet?

    bug-locked-grid-example.png

  3. #3
    Touch Premium Member
    Join Date
    Sep 2011
    Posts
    9
    Vote Rating
    0
    ilmcon is on a distinguished road

      0  

    Default


    Hey, thx 4 helping. No it is not quiet what i was hoping to see, the little arrow button in the grid header is missing. The Arrow which opens the menu to lock a column and all this stuff.

  4. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,470
    Answers
    442
    Vote Rating
    202
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    Oh, I see. The menu trigger should appear when you mouse over the column header (on the unlocked side of the grid at least).

Thread Participants: 1