I am trying to make a tree representation in ExtJS. I have a service return this Json File.
can u help me in building the Model , Store and view to build the tree? thanks in advance.
I am trying to make a tree representation in ExtJS. I have a service return this Json File.
can u help me in building the Model , Store and view to build the tree? thanks in advance.
Copyright © 2021 Jogjafile Inc.
first of all, you must modify your JSON to the structure which will accept the tree. In your JSON there is property id for each object. this id property must be unique, in your case you have group id:1 and device id:1. this must be changed during data modification.
here we are creating models and modifying JSON recursively to achieve desired data structure.
NOTE mType property which will define a model for node. see fiddle, also documentation for treepanel