sherinpoulose 0 Light Poster

I have data in arraylist like below.

Item
| outlook |
< overcast >
| yes |
< rainy >
| wind |
< strong >
| no |
< weak >
| yes |
< sunny >
| humidity |
< high >
| no |
< normal >
| yes |


out of this data, i have to picturise it in the form of a tree like the one in the attachment;

the arraylist will be generated dynamically using the below code;

ArrayList output = new ArrayList();
        public ArrayList printNode(TreeNode root, string tabs)
        {

            output.Add("| " + root.attribute.AttributeName + " |");

            if (root.attribute.values != null)
            {

                for (int i = 0; i < root.attribute.values.Length; i++)
                {
                    output.Add("< " + root.attribute.values[i].ToString() + " >");

                  TreeNode  childNode = root.getChildByBranchName(root.attribute.values[i]);

                    printNode(childNode, "\t" + tabs);
                }
            }


            return output;
        }

how can i show it in form of tree like the one in the attachment in asp.net
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.