Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Jan 2010
    Location
    Brno, Czech Republic
    Posts
    33
    Vote Rating
    0
    honzakuchar is on a distinguished road

      0  

    Default Property grid + custom store -> undefined variable

    Property grid + custom store -> undefined variable


    Hello!

    Try to configure PropertyGrid with custom store. It fails with undefined error. Current constructor looks like this:

    Code:
    ...
    me.customRenderers = me.customRenderers || {};        me.customEditors = me.customEditors || {};
    
    
            // Create a property.Store from the source object unless configured with a store
            if (!me.store) {
                me.propStore = me.store = new Ext.grid.property.Store(me, me.source);
            }
    
    
            if (me.sortableColumns) {
                me.store.sort('name', 'ASC');
            }
    ...
    ...but it should look like this:

    Code:
    ...
    me.customRenderers = me.customRenderers || {};        me.customEditors = me.customEditors || {};
    
    
            // Create a property.Store from the source object unless configured with a store
            if (!me.store) {
               me.store = new Ext.grid.property.Store(me, me.source);
            }
            me.propStore = me.store
    
    
            if (me.sortableColumns) {
                me.store.sort('name', 'ASC');
            }
    ...
    Best regards
    Honza Kuchar

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,682
    Vote Rating
    435
    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


    Can I get a test case that I can run locally to reproduce the error?
    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.

  3. #3
    Sencha User
    Join Date
    Jan 2010
    Location
    Brno, Czech Republic
    Posts
    33
    Vote Rating
    0
    honzakuchar is on a distinguished road

      0  

    Default


    Here is the code that should work but it doesn't:

    Code:
    Ext.define("App.grid.ObjectPropertyGrid", {    
        extend: "Ext.grid.property.Grid",
        
        initComponent: function() {
            this.store = Ext.create("App.grid.PropertyGridStore", this, this.source);
            this.callParent(arguments);
        }
        
    });
    Here is working code:
    Code:
    Ext.define("App.grid.ObjectPropertyGrid", {
        
        extend: "Ext.grid.property.Grid",
        
        initComponent: function() {
            this.propStore = this.store = Ext.create("App.grid.PropertyGridStore", this, this.source);
            this.callParent(arguments);
        }
        
    });