|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
TreeView
I'm trying to create a treeview that is client based. I would like to make it so that the treeview only has one node open at a time. So when a node is open, and the user clicks on another node, the previous one will close up.
Microsoft has a Page for a javascript treeview, but they never addressed the issue I was hoping to impliment. Does anyone have any suggestions for how this would be accomplished? |
|
#2
|
||||
|
||||
|
This won't be an easy thing to implement, which maybe why they didn't touch on it. Basically what you would need to do is in the OnClick event of the image that expands the node, you would have to loop through all the nodes to determine if another node is open (Expanded="true"), then set it to false, then open the node they just clicked.
|
|
#3
|
|||
|
|||
|
Okay I got this figured out. Whew, there's a lot of code to sort through before the answer becomes apparent.
In the treeview.htc file go to the function called: function selectNode(node, delay) In there, there's a line of code that says: PHP Code:
Change it so it looks like this: PHP Code:
Last edited by trueneutral : March 31st, 2004 at 05:18 PM. |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > TreeView |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|