AJAX Treeview How to keep expanded nodes expanded during AJAX postback

  • Thread starter Thread starter ton
  • Start date Start date
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
 
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.
 
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
 
Back
Top