PDA

View Full Version : Can I convert a JsonStore (or similar) to a TreeLoader?



js_coder
23 Sep 2009, 8:26 AM
I have some common data that I'd like to use for both a tree view and a grid. This is possible because the data is not nested, and I've chosen a tree for a simple list representation of the data (please let me know if there's a better alternative). Is there a way to use this store as the tree's loader as well?

zhegwood
23 Sep 2009, 12:55 PM
Something like this? http://www.extjs.com/deploy/ext/docs/output/Ext.tree.TreeLoader.html

js_coder
19 Nov 2009, 2:10 PM
Thanks for the suggestion, but that's very different from a store. I've found the lack of store integration in trees to be somewhat limiting.

napiform
28 Jun 2011, 5:16 AM
I have this question as well. Does anyone have a suggestion?


I have some common data that I'd like to use for both a tree view and a grid. This is possible because the data is not nested, and I've chosen a tree for a simple list representation of the data (please let me know if there's a better alternative). Is there a way to use this store as the tree's loader as well?

skirtle
28 Jun 2011, 2:18 PM
If you don't have any 'nesting' in your data it might make more sense to try using an Ext.list.ListView or a custom DataView instead.

If you do want to use a tree you can always loop over the records and build up the tree's nodes yourself.