Solved

Playing with TreeViews

Posted on 2007-04-05
3
303 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Suggested Solutions

Title # Comments Views Activity
itextsharp with c# 3 18
Navigation Menu Does Not Show on iPad 4 30
Need help with another query 10 36
Trigger C# code inside the SQL Server 6 29
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
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 tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

763 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