PDA

View Full Version : [CLOSED] Annoying Issue with an Accordion



CanopiusApplications
Dec 04, 2013, 5:46 PM
Guys

I have an accordion with 2 tree views. I call a direct method to reload the first tree view and then use the following code to get it to refresh




treeMeasures.Render(treeMeasures.ClientID, RenderMode.Replace);

// Also tried insertto



This works however the 2nd tree in the accordion think it is now expanded so the original tree is no longer visible. I then set the collapsed property of the 2nd tree however the whole thing creates a lot of screen flicker.

I have tried suspending events and layouts but I cant stop the accordion from expanding the 2nd element.

Is there any way to stop the accordion from auto expanding/collapsing?

Thanks,
Daniel

Baidaly
Dec 04, 2013, 9:12 PM
Hello!

Could you provide a sample with it? How do you refresh the trees?

Try to wrap the tree in a container.

CanopiusApplications
Dec 05, 2013, 8:45 AM
Hello!

Could you provide a sample with it? How do you refresh the trees?

Try to wrap the tree in a container.

Hiya and thanks for the quick response.

I don't have a sample that is easily runable however I was loading the tree directly like tree.root.add and trying to render from a server side direct method which worked but caused the accordion to collapse. I tried rapping the tree in a container but for some reason got a script error.

Either way does not matter as solved it by returning a json object to the client side caller and repopulating the tree client side which works like a charm. I am also guessing that this is recommended method?

Dan

Daniil
Dec 05, 2013, 2:04 PM
Either way does not matter as solved it by returning a json object to the client side caller and repopulating the tree client side which works like a charm. I am also guessing that this is recommended method?

Do you mean that you just repopulate the tree's nodes? If so, yes, it is better when re-rendering the entire tree.

CanopiusApplications
Dec 06, 2013, 11:20 AM
Do you mean that you just repopulate the tree's nodes? If so, yes, it is better when re-rendering the entire tree.

Basically I have a tree with a filter above it. The issue was that loading the entire tree was slow (2000 items) so I added the bufferedview however this did not work properly with the client side filter code (used your example). So instead of doing a client side filter I returned to the database to get only those items matching the filter and hence the need to repopulate the tree. The repopulation does the entire tree.

Not that this helps much but here is a screen shot.

73427343

Either way I am sorted using json return

D

Daniil
Dec 06, 2013, 3:38 PM
Thank you for the details. I like you solution to filter the nodes on server side.