How to extend the TreeView to create a HierarchicalTreeView RRS feed

  • Question

  • User-1887867400 posted

    Hi need some directions regarding how we can extend a TreeView control and change its appearance to look like a hierarchical tree structure (or binary tree)? so that it can be used for generating a MLM tree from the database with clickable nodes.

    Tuesday, March 29, 2011 5:12 AM

All replies

  • User1062580462 posted

    Hi Vijay,


    You cannot derive the "TreeView" control for the change of it rendering style because its "TreeNodeCollection" is sealed one which in-charge of Saving/recreating all "TreeNodes" to/from viewstate. So better, you can derive from the "DataBoundControl" and define your own way of Rendering "HierarchicalTreeView".

    Tuesday, March 29, 2011 8:06 AM
  • User-1887867400 posted

    hi bharat thanks for replying.

    can u provide some links to samples or demos??

    Wednesday, March 30, 2011 3:28 AM
  • User1062580462 posted

    Hi Vijay,

    You can get excellent sample from this link.


    Here they have also listed the Member and Methods available. Example is given in last section.

    Friday, April 1, 2011 2:26 AM
  • User-1887867400 posted

    Hi all thanks for replying.

    But the problem is that, this msdn link just lists the api for HierarchicalDataBoundControl but i'm looking for a complete sample that implements the UI of the control like a Binary Tree. Something like this. And each node can hold some controls there.

    The nodes not necessarily needs to be round but should be able to hold other controls as well.

    Monday, April 4, 2011 1:38 AM
  • User3866881 posted


    I cannot see the picture. Are you sure that your link is right?


    Monday, April 4, 2011 1:57 AM
  • User-1887867400 posted

    Hi the link is working. Ok try this one

    Tuesday, April 5, 2011 5:07 AM
  • User-1474096950 posted



    i aslo need a silimar help i need to develop a tree with 3 nodes . wht do i use & how culd i start with ??

    i saw the image of the binary tree , it shld be similar but with 3 nodes instaed of 2 , using framework 2.0 asp.net


    Saturday, April 30, 2011 2:25 AM