View Full Version : Treegrid with complex JSON.

1 Nov 2011, 7:50 AM
Hello everyone.
I am trying to use a treegrid component to display a JSON.
The main problem I have is that the JSON doenst follow the usual hierarchy with "children" for example.
I have to display some information in the treegrid manner, but my JSON is somewhat complex, like, the "children" info is not on a children tag.

So, for example, if my JSON was like

a : [{
b: {name : ABC},
c: [{
d: {desc:AAA},
d: {info:BBB},
d: {smtelse:CCC},

And I need to display them like:


Can I do that without the "children" hierarchy?

1 Nov 2011, 2:03 PM
It isn't impossible but it would be tricky. You might be able to do it by extending the Json reader and overriding the method getResponseData. I think if you use that to munge the response data from the current format to the expected format it should work.

17 Nov 2011, 7:44 AM
We went for the "quicker" way. I just render a full Ext file the way I want, with inline stores and etc.

In the future we gonna need to move to the JSON way and create Rest interfaces...