CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_studio_2005 Tags:
Item Type: NewsGroup Date Entered: 9/15/2005 6:26:48 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
7.00
XPoints: N/A Replies: 2 Views: 337 Favorited: 0 Favorite
3 Items, 1 Pages 1 |< << Go >> >|
skottt
Asp.Net User
TreeView autoexpand node?9/15/2005 6:26:48 PM

0

I am developing a new site and have created a MasterPage for it.  I am using a TreeView on the MasterPage with a SiteMapDataSource to provide navigation.  I have the SiteMapDataSource ShowStartingNode=false and the TreeView ExpandDepth=0.

My question is this: when a user clicks on a node in the TreeView, if it has children, can I make it auto expand to show the children?

Thanks

jdixon
Asp.Net User
Re: TreeView autoexpand node?10/6/2005 5:31:27 PM

0

Sorry for the delayed response - I have been on vacation.

 

As long as those nodes you would like to expand do not need to be navigated to, and the web.sitemap does not have a URL attribute set for the nodes you wish to have this expand happen on you should be fine with the below code (sorry for the bad formatting):

HTH

JD

web.sitemap

<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<
siteMapNode url="" title="">
<
siteMapNode title="Home">
<
siteMapNode url="Default2.aspx" title="Home2">
</
siteMapNode>
</
siteMapNode>
<
siteMapNode title="About Us">
<
siteMapNode url="AboutUs2.aspx" title="About Us2">
</
siteMapNode>
</
siteMapNode>
</
siteMapNode>
</
siteMap>

aspx page

<%@ Page Language="C#" %>
<html>
<
head runat="server">
</head>
<
body>
<form id="form1" runat="server">
<asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1" ExpandDepth="0">
<DataBindings>
<asp:TreeNodeBinding DataMember="SiteMapNode" NavigateUrlField="Url" SelectAction="Expand" TextField="Title" />
</DataBindings>
</asp:TreeView>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" />
</form>
</
body>
</
html>

 


This posting is provided "AS IS" with no warranties, and confers no rights.
We Are Hiring
dmc7198
Asp.Net User
Re: TreeView autoexpand node?6/6/2006 3:18:17 PM

0

Hi,

I have a masterpage with a treeview that I use to navigate to different folders and pages.  It works very nice with the roles.

Every time I select a node, the page refreshes and shows the appropriate page.  The treeview also refreshes and will all collapse or expand based on ExpandDepth property.

The users are requesting for the treeview control to remain unchanged after he/she makes a selection.  Is this possible?

Dario

3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
CodeGuru.com Visual C++ goodies Authors: Media Group Int, Nigel Quinnin, Pages: 600, Published: 2003
Pro ASP.NET web forms techniques Authors: Alex Homer, Pages: 588, Published: 2004
Step-by-step programming with base SAS software Authors: SAS Institute, SAS Publishing, Pages: 761, Published: 2001

Web:
TreeView autoexpand node? - ASP.NET Forums My question is this: when a user clicks on a node in the TreeView, if it has children, can I make it auto expand to show the children? ...
Treeview auto expand node - ASP.NET Forums Treeview auto expand node. Last post 04-15-2004 9:31 AM by ferkh10. 0 replies. Sort Posts: Oldest to newest, Newest to oldest ...
Auto-expand nodes in Treeview on Search : VB6 Nov 5, 2008 ... Hi. My code allows a user to search for a Product Name, which is contained within a Treeview Node. If the Nodes are NOT expanded, ...
Auto expand child nodes of selected node I am using the TreeView control with a sitemap - and it works great. However, I' ve got a slight problem in that I want the child nodes of ...
ASP.NET TreeView auto expand? - Stack Overflow ASP.NET TreeView auto expand? ... Calling a method when a tree node is clicked in the Standard ASP. ... Hiding ASP.NET SiteMap nodes in TreeView control ...

TreeView autoexpand node? - ng.asp-net-forum.visual_studio_2005 TreeView autoexpand node?, > ROOT > NEWSGROUP > Asp.Net Forum > visual_studio. visual_studio_2005, Date: 9/15/2005 6:26:48 PM, Replies: 2, Views: 336, ...
network BIOS command limit has been reached - ng.asp-net-forum ... treeview autoexpand node? vs 2005 debug on firefox, i want to change to run on ie · debug from the first line · debugging javascript with ie7 and visual ...
Application for project 'http://localhost/project' is not ... treeview autoexpand node? doubt in visual studio build [makefile] · 'publish web site' or 'copy web site' don't found in web application ...






generating delegate methods

hi when is expect release versions of ms studio 2005 / asp.net 2.0

reportviewer with asp.net 2.0 and sql server 2000 reporting service

java sdk

error running asp.net 1.1 application under the subfolder or asp.net 2.0 application

easily wrap text in a span from design view

why can't i put my web project in the root?

asp.net 1.1 on vs 2005

windows service won't send email with vs2005

cannot create local iis vb asp.net website

visual studio 2005 team edition for software architects

vs shortcut: collapse all?

go to definition is not going to code, instead it goes to meta data

vwd v.s. vs - as far as ease of use

visual studio 2005 invalid search path

unable to add references to a website on a remote computer

new c# problems

nested master pages and design view issue

visual studio web project support

how to debug a class library when start action is "start browser with url:"

vista gadgets with vs2005

no solution file after creating a new web site project in vs 2005

how to create a windows installer of a asp.net website

application for project 'http://localhost/project' is not installed.

replacing page base class across the whole site

why can't i run programming samples

objectdatasource control not visible

solved : add reference dialog box show nothing

how to see events in visual studio...

problems with compiling using visual studio 2005

   
  Privacy | Contact Us
All Times Are GMT