• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 929
  • Last Modified:

Extend TreeView Display Line

I'd like to modify the TreeView so it shows the content of the node as well as the node name.

I can intercept the node in TreeView display of an XMLDocument during TreeNodeDataBound, and see into the source node for the TreeView node display.

Protected Sub TreeView1_TreeNodeDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.TreeNodeEventArgs) Handles TreeView1.TreeNodeDataBound

Dim wrkStr1 As String = e.Node.Value
Dim wrkN As XmlNode = e.Node.DataItem
Dim wrkStr2 As String = wrkN.Name
Dim wrkStr3 As String = wrkN.InnerText
Debug.Print(wrkStr1 & " " & wrkStr3)

End Sub

But I can't find a way to change the output display....the "e.Node" seems to be pointing at the source, instead of the output (unlike the analogous e.Row for a GridviewRowDataBound event.)

There are many google hits on "customize treeview" and "extend treeview", but there's nothing simple (or at least simple enough for me!)

Any pointers to the essential techniques needed to add an extra field to the TreeView display output (if such exists) would be appreciated.


1 Solution
codequestAuthor Commented:
I conclude from lack of response after 5 days that there is no "simple" way to extend TreeView display.   Nor did I get a solution (after 6 days) from http://forums.asp.net/MyForums.aspx.

I also cross reference this conclusion with net-search results.  There are lots of net-search hits for "customize TreeView" and "extend TreeView"...however, they generally appear to involve a product or a relatively complex custome control based on TreeView.
Asker resolved question - the 500 points have been refunded and the question

Experts Exchange
Community Support Moderator

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now