Extend TreeView Display Line

Posted on 2006-06-01
Last Modified: 2009-12-16
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.


Question by:codequest
    LVL 2

    Author Comment

    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

    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.

    Accepted Solution

    Asker resolved question - the 500 points have been refunded and the question

    Experts Exchange
    Community Support Moderator

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Suggested Solutions

    Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
    In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now