Displaying detail data as a hierarchic structure

Question



How can I display detail data as a hierarchic (tree-like) structure?

Answer



To implement displaying the detail data as a hierarchic (tree-like) list, perform the following steps:

  1. The detail object should have a field containing the parent record identifier (e.g., Parent) that would refer to this object. This field should be specified in the "Parent in the hierarchy" property of the detail object.
  2. In the diff property of the detail schema, add the following values for the DataGrid element: "hierarchical":true and "hierarchicalColumnName": "" (the second property should only be specified if the parent column name is different from Parent).
  3. Add a custom button (or edit the existing one) to be able to add new detail elements to the hierarchy root or as subordinate to the selectedrecord.
  4. Implement methods of adding records to the needed hierarchy branch and other records if needed (it depends on the detail implementation).

See the attached file for more info.

Like 2

Like

Share

2 comments

I tried to do it on a custom section with a very simple custom detail (made only of Name, Main record ID and Parent lookup field to the same custom section used as detail), only setting up the DataGrid element but the hierarchical structure is not built: I see the list "normal". What is wrong for me?

Hi Massimiliano, 

 

Please make sure that you have completed all the steps from the instruction(attached to the article above).

 

Also please double check if you saved and published the detail object.

 

Nevertheless please don't displaying the parent column in the list. The hierarchy will not be built. 

 

Best regards, 

 

Bogdan L.

 

 

 

 

 

 

 

Show all comments