*** Set up the array property for the Treeview *** And then load the top level nodes *** The columns define the data for a level of the hieracrchy as follows: *** col 1: Alias name that supplies the data *** col 2: Name of PK field in that alias *** col 3: Name of FK field that relates date at this level of the hierarchy to its parent *** col 4: Expression to use to populate the Node text *** col 5: name of alias that hold data for parent node. This is required because in some *** implementations (like customers) a single parent node can have child nodes that *** come from 2 different data source so we need some way to link heterogenous children *** to a common parent *** col 6: Name of the entity at this level of the hierarchy. Required to build context sensitive *** menus on right click *** col 7: Name of data container class to instantiate on the right side of the form for this nodeThen I construct the node key for each node in the Tree like so:
AliasName + [*] + TRANSFORM( Alias.PK ) + [*] + TRANSFORM( Alias.FK )That way, I can use GETWORDNUM() to parse out the various elements of the Node Key in the TreeView's NodeClick() event so I can do whatever I need to.