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.


Who is Participating?
RomModConnect With a Mentor Commented:
Asker resolved question - the 500 points have been refunded and the question

Experts Exchange
Community Support Moderator
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.