简体   繁体   中英

Hierarchy Custom User Control

I'm looking to develop a custom hierarchy control. I'm having a hard time wrapping my brain around the concept. My question is this. Whether to derive from a Gridview or to derive from a Treeview control. If anyone has any thoughts or links on the overall implementation of either that would be great. Thanks in advance.

My Data is coming back with a level column on each row if this helps.

I've looked at ComponentArt's solution but in many cases right now company funding won't allow for this or the "RadGrid" solutions.

The Treeview seemed like a logical option because it has the relations. I have to make a dynamic one to many relationship. I won't know the parent until I run the query.

Deriving the control would be ideal. Because of the amount of Javascript I've seen in pretty much all examples of this online. I'd like to contain it for other developers to use.

Your question is rather vague. If you want to change the behavior of GridView and you want to create a tabular list like that, you can derive your class from GridView or System.Web.UI.WebControls.DataBoundControl . But TreeView is so different, you can derive your class from System.Web.UI.WebControls.HierarchicalDataBoundControl if you want a hierarchical control or TreeView class for changing behavior.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM