Solved

Playing with TreeViews

Posted on 2007-04-05
3
305 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 500 total points
ID: 18861654
want you want is an accordion, not a treeview.
0
 
LVL 12

Assisted Solution

by:craskin
craskin earned 500 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…

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