-
31 Aug 2012 5:20 AM #1
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:
...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.propStore = me.store = new Ext.grid.property.Store(me, me.source); } if (me.sortableColumns) { me.store.sort('name', 'ASC'); } ...
Best regardsCode:... 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'); } ...
Honza Kuchar
-
31 Aug 2012 6:42 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,682
- Vote Rating
- 435
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.
-
8 Sep 2012 9:10 AM #3
Here is the code that should work but it doesn't:
Here is working code: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); } });
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); } });
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote