How to use the treeview widget for this basic use case

0
Hi, I have a use case where I have list of records in which every record has “id” and “parent_id”. My grid should represent a heirarchy like this :  Object 1       → Object 2       → Object 3 Object 4 Object 5       → Object 6 Here, all objects are of same type (say “SampleObject”) as mentioned earlier. I have to manually traverse through the records to find children of a specific parent to show the heirarchy. I tried using treeview from the appstore : https://appstore.home.mendix.com/link/app/294/ ISSUE 1 : But I’m not sure how to fit it for this scenario. (I have to achieve this via above approach because Mendix was not able to recognize this heirarchy in my JSON :  {     "id": "1",     "parent_id": "0",     "children": [         {         "id" : "2",         "parent_id": "1",         "children": [             {             "parent_id":"3",             "id": "2",             "children": [{                     }]             }         ]         }     ] } Here there is single object type which has “id”,”parent_id” and “child”. But Mendix creates seperate entities for every object. ISSUE 2 : That’s why I’m now using flat data with just “id”, “parent_id” and leaving the heirarchy to be computed at Mendix side.) Can you please provide a solution for this?
asked
3 answers
0

Hi Niraj,

If you go to github and download the repository, there is an example project in the test folders. 

https://github.com/mendix/TreeViewAndGridView

answered
0

Hi Niraj,

I have a similar requirement and struggling to set up the tree view widget, did you get this to work?

If yes, can you please suggest how? 

-Ketan

answered
0

@Ketan Patil,

I also tried to make the “TreeView and GridView” work and was not able to.

But I was able to work with “Tree view widget” https://appstore.home.mendix.com/link/app/38862/

HIH

answered