Welcome Guest Search | Active Topics | Sign In | Register

TreeNode Expanded value sometimes not correct Options
ixthnar
Posted: Sunday, June 3, 2012 6:21:04 PM
Rank: Advanced Member
Groups: Member

Joined: 11/15/2008
Posts: 44
First of all, I love EO.Web and find that most things work well and are convenient to use. That said ...

I've tackled this bug in my product (web app using EO.Web) on and off over the past year. I am finally pretty certain that it is an EO.Web problem. I am using EO.Web 2012 and it is still happening.

The situation is an EO TreeView using PopulateOnDemand inside an EO callback panel with the TreeView as a trigger (including children). The client side implements some functionality that acts on the TreeView and some functionality that does executes via the callback panel.

Server-side, both in the PopulateOnDemand handler and in the handler for callback panel executes, I notice that entire current content of the tree is present. It is correct except the TreeNode.Expanded property. The TreeNode.Expanded property is always false except for the top level node which is accurate and, of course, was populated statically (as opposed to on demand).

Is there some trick to getting the TreeNode.Expanded to be accurate? The only work around I can conceive is use ClientSideOnGroupExpanded and ClientSideOnGroupCollapsed events to maintain a list of a client-side list of expanded nodes. Is there a better way?

Thank you!
Chris
eo_support
Posted: Monday, June 4, 2012 3:13:12 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Please try to use a "regular" event instead of the CallbackPanel's Execute event. You should always get the whole TreeView and accurate expanded status in a regular event such as ItemClick event. CallbackPanel's Execute event happens at very late stage of the page's life cycle and the information may not be accurate at that time.

You should not access the TreeView inside your PopulateOnDemand event handler. PopuplateOnDemand does not do a full scale post back and does not fully restore the whole TreeView. It only builds a minimum context node for you to add child nodes.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.