1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    126
    Vote Rating
    0
    rushi2440 is on a distinguished road

      0  

    Default Answered: headerCtCfg is undefined

    Answered: headerCtCfg is undefined


    Hi
    I am using Desktop view. and I am creating Grid panel in extjs mvc structure.
    when I am clicking on desktop icon at that time i am getting headerCtCfg is undefined.
    my controller is
    Code:
    Ext.define('gantt.controller.AlbumsController', {
        extend: 'Ext.app.Controller',
        stores: ['Albums'],
       models: ['Album'],
        views: ['List'],
        init: function() {
            console.log("Init");
        }
    });

    main window view code is
    Code:
    Ext.define('gantt.view.MainWindow', {
        extend: 'gantt.model.Module',
        alias: 'widget.mainWindow',
        id: 'mainWindow',
        requires: ['gantt.view.List'],
        init: function() {
            this.launcher = {
                text: 'Album Management Window',
                handler: this.createWindow,
                scope: this
            };
        },
        createWindow: function() {
            var desktop = this.app.getDesktop();
            var win = desktop.getWindow('gridView');
            if (!win) {
                win = desktop.createWindow({
                    id: 'gridView',
                    title: 'Album Management',
                    width: '99.5%',
                    height: '95%',
                    animCollapse: false,
                    constrain: true,
                    layout: 'border',
                    draggable: true,
                    closeAction: 'destroy',
                    items: [{
                        region: 'center',
                        collapsible: true,
                        xtype: 'gridtest'
                    }]
                    });
                }
                win.show();
                return win.setPosition(100, 100);
            }
        });

    my gridpanel view code is
    Code:
    Ext.define('gantt.view.List', {
        extend: 'Ext.grid.Panel',
        alias: 'widget.gridtest',
        store: 'Albums',
        id: 'gridtest',
        initComponent: function() {
            console.log("Init component");
            this.callParent(arguments);
        }
    });
    my model is
    Code:
    Ext.define('gantt.model.Album', {
        extend: 'Ext.data.Model',
        fields: [
                    {
                        name: 'id',
                        dataType: 'int',
                        optional: true
                    },
                    {
                        name: 'name',
                        dataType: 'string',
                        optional: true
                    },
                    {
                        name: 'artist',
                        dataType: 'string'
                    }
                ],
        idProperty: 'id',
         proxy: {
                type: 'ajax',
                api: {
               read: 'Album/Get',
                   create: 'Album/Create',
                   destroy: 'Album/Delete',
                  update: 'Album/Update'
              },
                reader: {
                    type: 'json',
                    root: 'data'
                },
               writer: {
                   root: 'data',
                    type: 'json',
                    encode: true,
                   writeAllFields: true
                }
           }
    });
    my store is
    Code:
    Ext.define('gantt.store.Albums', {
        extend: 'Ext.data.Store',
        autoLoad: true,
        autoSync: true,
        model: 'gantt.model.Album'
    });
    RPKintu
    Sr. Programmer
    Kintudesigns.com

  2. Have you tried giving the grid some columns?

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,121
    Vote Rating
    453
    Answers
    3160
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Have you tried giving the grid some columns?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Apr 2011
    Posts
    126
    Vote Rating
    0
    rushi2440 is on a distinguished road

      0  

    Thumbs up


    Hi

    got the solution..
    I forgot to add columns to grid panel view.

    RPKintu
    Sr. Programmer
    Kintudesigns.com

Tags for this Thread