p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 21st, 2009, 01:31 PM
Friend of Wrox
Points: 788, Level: 10
Points: 788, Level: 10 Points: 788, Level: 10 Points: 788, Level: 10
Activity: 17%
Activity: 17% Activity: 17% Activity: 17%
 
Join Date: Nov 2007
Location: Central Florida, USA.
Posts: 199
Thanks: 2
Thanked 15 Times in 15 Posts
Default TreeView Select help...

I have a treeview that I'm dynamically creating on the page load. When i click the node in the treeview the node is selected and highlighted then in the SelectedNodeChanged event i'm gathering data based on the node value and displaying a modal. Now my issue is that if i close the modal and select the same node again nothing happens, because the node is already selected. So what i have to do is click another node, close the modal then select the node i originally selected to get it to display.

So what I need to figure out is:

How do I reselect a node that has been selected
or
Unselect that node once I display my modal but then make it look selected so that i can select it again.

I tried the second option but i don't know how to make it not look selected once i do change my node selection.

I'm assuming that on the SelectedNodeChanged even I need to pass the node value then unselect it then use Javascript or something to change the background color to make it look selected. But the issue comes on how to make it not look selected when i do change it?

I hope this isn't too confusing. Any help would be appreciated, I've googled this but with no luck and i'm just having a huge brain fart!
__________________
Jason Hall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old June 21st, 2009, 02:41 PM
Lee Dumond's Avatar
Wrox Author
Points: 4,237, Level: 27
Points: 4,237, Level: 27 Points: 4,237, Level: 27 Points: 4,237, Level: 27
Activity: 48%
Activity: 48% Activity: 48% Activity: 48%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 803
Thanks: 12
Thanked 139 Times in 139 Posts
Default

Probably the easiest way to deal with this is to include a button as an alternate way to initiate the postback.

This is a common pattern when using dropdown lists that post back on SelectedIndexChanged. There is also a "Go" button to make the postback happen when the same item remains selected.
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
The Following User Says Thank You to Lee Dumond For This Useful Post:
alliancejhall (June 21st, 2009)
  #3 (permalink)  
Old June 21st, 2009, 02:59 PM
Friend of Wrox
Points: 788, Level: 10
Points: 788, Level: 10 Points: 788, Level: 10 Points: 788, Level: 10
Activity: 17%
Activity: 17% Activity: 17% Activity: 17%
 
Join Date: Nov 2007
Location: Central Florida, USA.
Posts: 199
Thanks: 2
Thanked 15 Times in 15 Posts
Default Hmm...

I guess that could work. I don't know if I totally like that solution but it may get me by until I figure something out... Thanks Lee!
__________________
Jason Hall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
asp:treeview select node from backend function angshujit ASP.NET 2.0 Basics 0 December 16th, 2008 05:17 AM
Programmatically select a treeview node and expand simsen ASP.NET 2.0 Professional 0 June 23rd, 2008 02:57 AM
How to select a node or text from treeview MacDevv C# 2005 3 September 5th, 2006 06:23 AM
Fill select box and select recordset value markd Classic ASP Databases 1 February 20th, 2006 06:41 PM
asp.net 2.0 treeview select node does not respond vhrao ASP.NET 2.0 Basics 0 February 17th, 2006 05:03 PM



All times are GMT -4. The time now is 11:31 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc