1 Reply Latest reply on Feb 9, 2007 11:56 PM by doug777

    Tree Control

    doug777 Level 1
      Can anyone help me understand the connection between the original data, dataDescriptor and dataProvider for a Tree control.

      For example, if my original data from a Remote Object and now an ArrayCollection looks like this (I have used the underscore just to keep the correct spacing):

      RoleID RoleName ChildOf

      null___ A_______ null
      1_____ B1______ null
      4_____ C1______ 1
      6_____ D2______ 4
      9_____ E3______ 6
      10____ E2______ 6
      7_____ D1______ 4
      13____ E1______ 7
      2_____ B2______ null
      3_____ C3______ 2
      8_____ D3______ 3
      11____ E5______ 8
      12____ E4______ 8
      5_____ C2______ 2

      and given that:

      RoleID is unique;
      an item with RoleID = null is a root (and there could be more than one of these);
      an item with a non-null RoleID and ChildOf = null is a child of a root item;
      a non-null ChildOf value must be a valid RoleID;

      but otherwise, the data could be anything in any order, what would be the basic steps required to convert this so that the Tree when fully expanded (for this example) looks like this:


      Any help or rough guidelines would be appreciated.