Solved

asp.net treeview - how to remove/ hide the root node?

Posted on 2010-11-12
3
1,054 Views
Last Modified: 2012-05-10
i have a asp.net tree view control and its being data bound to XML returned from the DB. once bound and the nodes are present in the control how can i remove/ hide the root node?

thanks!
0
Comment
Question by:realcoding
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
ssims45 earned 500 total points
ID: 34122520
Add XPath = "/*/*" to your XmlDataSource to not display the root node.
0
 

Author Comment

by:realcoding
ID: 34122675
im not using an XmlDataSource.

i have xml bound to the tree view that comes fromt eh SQL stored proc and it needs a top level node or else the XML wont be well formatted and SQL will error out.
0
 
LVL 1

Expert Comment

by:ssims45
ID: 34122848
I don't believe this is possible with the default TreeView control. You can hide the root element if you use a SiteMapDataSource. Your only other option is to find a custom TreeView that allows you to hide the root node.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
File Upload Control on a ASP.NET Overlay Page 1 21
Get String split 5 33
install app on other machine 13 11
Adjust the position 3 12
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video discusses moving either the default database or any database to a new volume.

706 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

15 Experts available now in Live!

Get 1:1 Help Now