How to put Expand all and Collapse all button for a asp.net TreeView Control ?

V

vivek

Well I have been using the new Microsoft asp.net 2.0 TreeView Control
in my application. I need to provide some kind of "Expand All" and
"Collapse All" button. This button should not post the form back to the
server but should work by Javascript only. Any suggestion is welcome.

Thanks

Vivek N
 
D

David Barkol

Try this:

TreeView_ToggleNode(ctl00_MainContent_TreeView1_Data,0,ctl00_MainContent_TreeView1n0,'-',ctl00_MainContent_TreeView1n0Nodes);

David Barkol
www.neudesic.com
 
Joined
Jun 14, 2007
Messages
1
Reaction score
0
Client Side Expand/Collapse All Nodes For ASP.NET 2.0 Treeview

vivek said:
Well I have been using the new Microsoft asp.net 2.0 TreeView Control
in my application. I need to provide some kind of "Expand All" and
"Collapse All" button. This button should not post the form back to the
server but should work by Javascript only. Any suggestion is welcome.

Thanks

Vivek N

check my blog entry here: http://pushpontech.blogspot.com/2007/06/client-side-expandcollapse-all-nodes.html

Hope this helps.
pushp
http://pushpontech.blogspot.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top