This is a migrated thread and some comments may be shown as answers.

toggling expand/collape button

1 Answer 66 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Kieran
Top achievements
Rank 1
Kieran asked on 26 Nov 2009, 11:18 PM
Hi

I have a javascript function that extracts a custom attribute from a treeview node and uses this to decide whether to hide or show the expand button. This works spot on when expanding a node.

However, I also store the treeview XML in a session variable so that when user navigates back to this page the treeview will be in the same shape as they left it. I have attached a function to the treeview OnClientLoad that uses recursion to naviage through all the expanded nodes toggling the expand button as required. Again this works fine.

However - and might not be possible - when a user navigats back to the page all the nodes have an expand button until the js function runs - which is very quick - a second maybe - however this looks unprofessional as the nodes disappear down the treeview.

Is there way to get around?

As a suggestion for future releases, if I may, it would be extremely handy to be able to set this client side

1 Answer, 1 is accepted

Sort by
0
Roland
Top achievements
Rank 1
answered on 27 Nov 2009, 09:11 PM
Hello,

What you can do is show some kind of "Loading Div" over your tree and just hide it  only as the last line of your JS function that enables that buttons.

This will give you "ajaxish" feeling.
Tags
TreeView
Asked by
Kieran
Top achievements
Rank 1
Answers by
Roland
Top achievements
Rank 1
Share this question
or