AJAX Treeview How to keep expanded nodes expanded during AJAX postback

T

ton

Hi,

In my website the treeview is placed in the update panel of AJAX. Clicking
on the nodes, the server side code is getting the childnotes and shows the
details on the right site of the treeview. just like an normal exploere
would do. After clicking on several nodes, I'll got deeper in the tree and
after a while, the right site shows the correct information, but the tree is
collapsed on a arbitrairy node. I can't figure out whats happening.

Another situation is that an node which was collapsed by the user is again
expanded, and another node is collapsed.

Does anyone got an idea. I do not handle clientscript after the click

How can I maintain the expanded/collapsed state.

Thanks


ton
 
O

Oceaneer

ShowExpandCollapse needs to be set to true and most likely the
EnableViewstate needs to be on for the tree and all parent elements.

Be careful of the tree control. It gets extremely large in a hurry (it is a
giant table). Just view the source of one of your pages to see what I mean.
Over a WAN link it can make the web page unusable.

What I like to do is put a method in my base form that parses a querystring
parameter (like ?node=sports/golf/tiger) and then use it to re-expand the
node on each postback.
 
T

ton

that is the default setting, which is allready set. The problem is not in
teh beginning. I'm showing a list, and after clicking I read the additional
content (childnotes) and so on. After a while (5 clicks) somtimes shorter,
the treeview is collapsed each time I click a different node.

This will not help.

My problem looks as if the additional nodes added to the treeview
"destroyes" the cache or state of the control and the treeview "thinks" that
other nodes should be expanded.

Thanx anyhow.
ton
 

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

No members online now.

Forum statistics

Threads
473,913
Messages
2,570,027
Members
46,419
Latest member
businessfunding

Latest Threads

Top