CodeVerge.Net Beta


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

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 1/9/2006 1:47:53 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 68 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
Tordyvel
Asp.Net User
TreeView expand single path1/9/2006 1:47:53 AM

0/0

Hi all!

Is there a way to have the asp.net 2.0 TreeView control only allow a single path to be expanded? I think I know how to do it using postback but I want it to be done client side. I've seen other tree controls that has this feature and would love to see it possible with the included TreeView control in asp.net 2.0.

Any ideas appreciated!

dannychen
Asp.Net User
Re: TreeView expand single path1/9/2006 5:31:44 PM

0/0

Tordyvel,
  Essentially what you would like is when a link is expanded, all other child links are collapsed, but you want this done on the client side.  Although this can easily be done on the server through postbacks, this isn't really supported by the TreeView on the client side because there is no client side OM for the TreeView that a user could hook into to add extra functionality.  If you file a comment at http://lab.msdn.microsoft.com/productfeedback/ we'll be able to track it and keep it in mind for future versions.
--
Danny 
disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
Tordyvel
Asp.Net User
Re: TreeView expand single path1/9/2006 8:07:02 PM

0/0

Thanks for your response!

I added suggestion FDBK43623 for this feature. Hope to see it implemented in the future!

/Torulf

kgreen
Asp.Net User
Re: TreeView expand single path1/13/2006 10:12:58 PM

0/0

dannychen wrote:
Tordyvel,
  Essentially what you would like is when a link is expanded, all other child links are collapsed, but you want this done on the client side.  Although this can easily be done on the server through postbacks, this isn't really supported by the TreeView on the client side because there is no client side OM for the TreeView that a user could hook into to add extra functionality.  If you file a comment at http://lab.msdn.microsoft.com/productfeedback/ we'll be able to track it and keep it in mind for future versions.
--
Danny 


I don't quite see how to do this with postbacks.  Perhaps some of my environment might help:

I'm using a SiteMap to manage a TreeView.  When I click on an element in a treeview (not necessarily expand, but click on the element itself), I want it both to navigate to the target page and also to expand itself (if any children) and collapse all others (except any parents).

What's the easiest way to do this?
nuke987
Asp.Net User
Re: TreeView expand single path3/6/2007 8:16:02 AM

0/0

I'm just new to all this too but i had a simular problem , only i use ajax with the treeview but i think it'll work the same

 In ur treeview1_selectednodechange

 dim openNode as string

'What i'm doing here is actually determining the valuepath of the selected node , and pulling out the level you want to be open , so in my case it's

lvl1

    lv2

    lvl2

    lvl2

And only 1 lvl1 can be open at one time after selecting

If Not TreeView1.SelectedNode.ValuePath = "0" Then

openNode = TreeView1.SelectedNode.ValuePath

openNode = Mid(TreeView1.SelectedNode.ValuePath, 3, 1)

OpenOneNode(

CInt(openNode))

End If

 Here i just enumerate through the lvl2 nodes , and check the part of the valuepath against that of the selected node part valuepath , if they match up , it expands , all the rest is collapsed.

Protected Sub OpenOneNode(ByVal opennode As Integer)

Dim a As New TreeNode

 

For Each a In TreeView1.Nodes(0).ChildNodes

If Mid(a.ValuePath, 3, 1) = opennode Then

a.Expand()

Else

a.CollapseAll()

End If

Next

End Sub

 

Hope it helps for you , it did the trick for me

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


Free Download:

Books:
Foundations of GTK+ Development Authors: Andrew Krause, Pages: 630, Published: 2007
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Pro ASP.NET 2.0 in VB 2005: From Professional to Expert Authors: Laurence Moroney, Matthew MacDonald, Pages: 1253, Published: 2006
Pro .NET 2.0 Windows Forms and Custom Controls in C#: From Professional to Expert Authors: Matthew MacDonald, Pages: 1037, Published: 2005
Microsoft Visual C# .NET 2003 Developer's Cookbook: Developer's Cookbook Authors: Mark Schmidt, Simon Robinson, Pages: 787, Published: 2003
Programming Visual Basic .NET Authors: Jesse Liberty, Dave Grundgeiger, Pages: 541, Published: 2003
Programming Microsoft Visual Basic 6.0: [master Object-oriented Programming Techniques for Rapid 32-bit Development] Authors: Francesco Balena, Pages: 1276, Published: 1999
Programming .NET Windows Applications Authors: Jesse Liberty, Dan Hurwitz, Pages: 1228, Published: 2003
Beginning SharePoint 2007: Building Team Solutions with MOSS 2007 Authors: Amanda Murphy, Shane Perran, Pages: 552, Published: 2007
QuickTime for .NET and COM Developers Authors: John Cromie, Pages: 341, Published: 2006

Web:
TreeView expand single path - ASP.NET Forums Is there a way to have the asp.net 2.0 TreeView control only allow a single path to be expanded? I think I know how to do it using postback ...
Single expand path in treeview – RadTreeView Single expand path in treeview – RadTreeView. ... the treeview automatically collapses nodes that are not on the path of the currently expanded node. ...
Essential Tools : Menus, Toolbar, Editors, Tree, Tabs, Docking ... Restrict your user to expand a single path in the tree to keep the tree height minimal. In other words, expanding a ... TreeView-Expand Single Path ...
ASP.NET TreeView Control Oct 21, 2006 ... Expand Single Path ... APNSoft TreeView now provides an extremely rich and powerful server-side API allowing developer to add, ...
CodeProject: Persisting Selected and Expanded State of Data-Driven ... Mar 28, 2008 ... Treeview navigation using keyed paths.; Author: OrlandoCurioso; ... the path is split into the keys and it's parent nodes are expanded, ...
[Glade-users] Re: single click treeview selection question (Kim Adil) Previous message: [Glade-users] single click treeview selection question ... &iter, path)) line in my code below always is false, ...
Silverlight Toolkit - Home Oct 28, 2008 ... But, HierarchicalDataTemplate doesn't expose the Expanded event as far as I can see and I can't figure out how to tack it onto the treeview ...
ASP.NET TreeView Control Expand Single Path ... APNSoft TreeView offers full up-level cross-browser support for IE 5.5+, ... Multiple TreeViews on a single page are allowed. ...
obout inc - ASPTreeView - Expand single node Example Free ASP Treeview - Incredibly fast. Unlimited nodes. Very easy to use. Lots of features and examples. Cross-browser. - Expand single node Example.
[ruby-gnome2-doc-cvs] [Hiki] update - Gtk::TreeView tree_view: A Gtk::TreeView * path: The path that's expanded --- row_expanded? .... A target entry array represents a single type of data than can be ...




Search This Site:










beta 2 profile not working

logged in to view reviews page

aspnet_paths table not getting populated using sqlmembershipprovider

opera and iis integrated security

login control - username whitespaces

adding data to aspnetdb.mdf programatically

suggestions for authenticating against an existing database

tools to scan for web vulnerabilities

file uploads + aspnet user

using oracle portal authentication to access an asp.net website

protected image gallery

passwordrecovery control in asp.net 2.0

createuser wizard

intranet application - resolving user identity over network

how to handle security exceptions

forms authentication: isapproved=true and islockedout=false, but login still fails.

authentication session timeout issue

direct the user's destination on login

lock down asp.net and component code to be read only

<appsettings>

retrieving user profile values for all users.

how to set password from cookie when mode of textbox is password ?

secure and unsecuring some page

dcom, web services and workgroup to domain authentication

when to authenticate?

problem with authentication

security

questions about user authentication

custom server control authentication and authorization

settingspropertynotfoundexception on editing password in custom membership provider

  Privacy | Contact Us
All Times Are GMT