|
|
 |
| 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.
|
 |

June 21st, 2009, 01:31 PM
|
|
Friend of Wrox
|
|
Join Date: Nov 2007
Location: Central Florida, USA.
Posts: 199
Thanks: 2
Thanked 15 Times in 15 Posts
|
|
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
|

June 21st, 2009, 02:41 PM
|
 |
Wrox Author
|
|
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 803
Thanks: 12
Thanked 139 Times in 139 Posts
|
|
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.
|
|
The Following User Says Thank You to Lee Dumond For This Useful Post:
|
|

June 21st, 2009, 02:59 PM
|
|
Friend of Wrox
|
|
Join Date: Nov 2007
Location: Central Florida, USA.
Posts: 199
Thanks: 2
Thanked 15 Times in 15 Posts
|
|
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
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |