Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Playing with TreeViews

Posted on 2007-04-05
3
Medium Priority
?
308 Views
Last Modified: 2012-08-13
Is there a way to use a TreeView to do a nifty collapsable page, like so:

<asp:TreeView ID="treeMainMenu" runat="Server" ExpandDepth="0" NodeIndent="5">
    <LeafNodeStyle CssClass="lnkBlueBold clsNinetyPercentFont clsUnderline" ChildNodesPadding="1" />
    <ParentNodeStyle CssClass="lnkRedBold clsNinetyFivePercentFont" />
    <SelectedNodeStyle CssClass="lnkBlueBold clsNinetyPercentFont" />
    <RootNodeStyle CssClass="lnkBlackBold" />
    <Nodes>
        <asp:TreeNode Text="Process" SelectAction="Expand">
            <asp:TreeNode Value="T01">
                <div>buncha content here</div>
                <div>buncha content here</div>
                <div>buncha content here</div>
            </asp:TreeNode>
            <asp:TreeNode Value="T02">
                <div>buncha content here</div>
                <div>buncha content here</div>
                <div>buncha content here</div>
            </asp:TreeNode>
        </asp:TreeNode>
    </Nodes>
</asp:TreeView>
0
Comment
Question by:Paul Kahl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
craskin earned 2000 total points
ID: 18861654
want you want is an accordion, not a treeview.
0
 
LVL 12

Assisted Solution

by:craskin
craskin earned 2000 total points
ID: 18861665
as far as i know, the asp:treeview control would not work the way you're asking. if you don't want to get into javascript or ajax, you can still do a postback accordion using asp:panel controls and views. it's just harder that way. the MS ajax CTP from www.asp.net/ajax has an accordion control that does what you want.
0
 
LVL 3

Author Comment

by:Paul Kahl
ID: 18861677
So a set of nested asp:Panel sets controlled in code-behind, basically, doing postbacks. Or some javascript and CSS, and a nice chunk of Divs.

Is there any nice documentation on accordion methodology out there?
0

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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Suggested Courses

715 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