IT Community - Software Programming, Web Development and Technical Support

Treeview control problem: Selected node is not retained when parent node is closed.

This is a discussion on Treeview control problem: Selected node is not retained when parent node is closed. within the ASP and ASP.NET Programming forums, part of the Web Development category; I have a treeView control on the top half of a Windows form. When you select a node in the ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > ASP and ASP.NET Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 01-23-2008, 05:09 AM
bluesky bluesky is offline
D-Web Analyst
 
Join Date: Jun 2007
Posts: 201
bluesky is on a distinguished road
Default Treeview control problem: Selected node is not retained when parent node is closed.

I have a treeView control on the top half of a Windows form. When you select a node in the tree, the bottom half of the form displays the associated data for the selected node.

My problem is that if the user closes the node, the selection is moved to the parent node and not retained. If the user then opens the parent node again - the selection is no longer there.

Is there a way to prevent this behavior and have the system retain the selected node?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-23-2008, 05:11 AM
shaalini shaalini is offline
D-Web Analyst
 
Join Date: Apr 2007
Posts: 342
shaalini is on a distinguished road
Default Re: Treeview control problem: Selected node is not retained when parent node is close

You can use the ensurevisible and the expand methods to show the children of the selected node. You can also create a node object that is checked during the node selected event if it is a parent of what is being selected and react accordingly
__________________
Shaalini.S
Be the Best of Whatever you are...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code-behind to create node dynamically using XML File or any Stored Procedure poornima ASP and ASP.NET Programming 3 02-14-2008 09:46 PM
I have a TreeView control in one of my webpages and I am facing the following problem itbarota C# Programming 1 07-27-2007 05:33 AM
How to solve the SQDataReader not closed problem when excuting another query during i Archer C# Programming 1 07-24-2007 12:30 AM
How to change Tree Node Tree Node oxygen Flash Actionscript Programming 1 07-21-2007 02:51 AM
Get XML node from string in Javascript Jeyaseelansarc PHP Programming 0 05-07-2007 07:28 AM


All times are GMT -7. The time now is 07:06 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0