Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    TreeGrid with multiple children nodes

    Hi there,
    I am trying to display multiple child nodes in a treegrid. setChildrenField api takes only one node name as children. In my structure I have more than one node name which should be displayed as children. Is it possible to display with treegrid. Any ideas or suggestions will be helpful.

    Here is a sample of my json input where i want to display both the nodes under BOM and Alternates as children in the tree to the parent 12345678.
    Code:
    {
    "Number":"12345678",
    "Name":"Test Name,
    "BOM":
      [
        {...},
        {...}
      ],
    "Alternates":
      [
        {...},
        {...}
      ]
    }
    Thanks,
    Prathap

    #2
    Here is the datasource code that I am using.

    Code:
    public BOMJsonDS(String id) {
    
        setID(id);
        setTitleField("Number");
        ....
        ......
        setChildrenField("BOM");
        setChildrenField("Alternates");
        .....
    }
    obviously it only takes last call of setChildrenField to use as child nodes.
    I would to like to do something like
    setChildrenFields("BOM","Alternates")
    Not sure if it is possible by extending TreeGrid and overwriting a method. Any suggestions will be helpful.

    Comment


      #3
      I am wondering what is the implemenation class for TreeGrid Widget which generates the final html from the configurations.
      I am trying to see if I can extend that class and achieve my requirement, to display children using 2 or 3 different field names.

      Thanks,
      Prathap

      Comment

      Working...
      X