Announcement

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

    How to: TreeGrid with nodes appearing multiple times in a tree

    Hi Isomorphic,

    I've not been using TreeGrids so far, but will do so now. In contrast to the samples I have a relation-table to connect entries of a base table:

    Code:
    T_LE_CONNECTION
    NAME         Datatype     Nullable
    ID           NUMBER(38,0)    No  --PK + sequence
    TENANT_ID    NUMBER(38,0)    No
    CREATED_BY   NUMBER(38,0)    No
    CREATED_AT   DATE            No
    MODIFIED_BY  NUMBER(38,0)    No
    MODIFIED_AT  DATE            No
    PARENT_LE_ID NUMBER(38,0)    Yes --root has "null" value as only entry, fk to t_legalentity
    CHILD_LE_ID  NUMBER(38,0)    No  --fk to t_legalentity as well
    With this you could build this tree, where every number is the CHILD_LE_ID.
    Code:
    0-(root)
       1-
          2
          3
       4-
          2
          5
    How would you build such a tree in SmartGWT?
    Please note that in contrast to your employees.ds.xml I can have an entry twice, like "2" in the example.
    Do I somehow need to create a unique column that I link with an foreignKey in .ds.xml?
    I could imagine creating such a thing with Oracle CONNECT BY PRIOR.

    Best regards
    Blama

    #2
    And I found this. I assume, I'll go the connect-by way for generating unique PKs.

    Comment


      #3
      Working like a charm. Once again amazed.

      Best regards
      Blama

      Comment


        #4
        Great to hear it's working for you!

        Comment

        Working...
        X