I am experimenting with the tree control and I am trying to figure out how to use an existing set of data to populate the tree.
I have an asset table that was previously used with a tree control in VB. To fill the tree I would use the following columns:
nodeID - Identity
parentNode – contains the nodeID of the parent leaf
assetName – Text description of the leaf
The root nodes consist of all items where parentNode = 0
Once the root nodes are identified I then iterate through the list one by one finding child nodes where nodeID = parentNode. I have used two different methods. One where all nodes are filled in at startup and the other where the child nodes are populated when it is clicked.
Since the tree control in ignition is populated by containing the entire path for the node in a column is there a way for me to create this path in SQL or will I have to manually convert this table?