|
Rank: Advanced Member Groups: Member
Joined: 8/11/2008 Posts: 37
|
I have a TreeView: <eo:CallbackPanel ID="CallbackPanel1" runat="server" Triggers="{ControlID:Trv;Parameter:}"> <eo:TreeView ID="Trv" runat="server" RaisesServerEvent="true" Height="450" OnItemPopulate="Trv_ItemPopulate" OnItemClick="Trv_ItemClick" /> </eo:CallbackPanel>
In Page_Load if (!IsPostBack) I load the root nodes.
I. If I expand a node the child nodes where shown. Now I click on a child node the tree colapses. No node is selected.
II. If I expand the child nodes clicking on a root node and click on a child node this node is selected and the tree not colapses.
I have set some breakpoints to look what happens:
I: Page_Load -> ItemPopulate; click on child node: Page_Load -> Page_Load -> ItemPopulate
II: Page_Load -> ItemPopulate -> ItemClick -> Page_Load -> ItemPopulate;
That shows 2 things: 1. in I) the ItemClick dosn't occur. Why? 2. On one postback the ItemPopulate fires twice. This illustrateds why the control becomes slow with many nodes.
I use EO.Web.dll V. 7.0.11.2
Uwe
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, I believe the TreeView has problems when AutoExpandOnClick, PopulateOnDemand both are true and inside a CallbackPanel. In this case when you click a TreeNode, it can not trigger both PopulateOnDemand and Callback. In order to avoid this situaiton, you can set AutoExpandOnClick to false. That way to expand a node, you would click the "+" sign, in order to click a node (to raise ItemClick event), you will need to click the node text. The sequence of ItemPopulate event is normal. Please see this post for a more detailed explanation about this: http://www.essentialobjects.com/forum/postst3201_Treeview-ItemPopulate-and-ItemClick.aspx#13297Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 8/11/2008 Posts: 37
|
Hello, if I set AutoExpandOnClick="false" I can expand a node but then when I click on a node to select it, the tree colapses. This is the behavior 1. I wrote. So I can't select a node. Without CallbackPanel it is the same behavior.
Is it not possible to prevent the first ItemPopulate because it has no effect. only it takes time?
Uwe
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We are not able to reproduce the problem where the tree collapses on click. It should not collapse. Please provide a test page (make sure it runs indepdently) that demonstrates the problem and we will be happy to take a look.
The first ItemPopulate call is necessary to rebuild the tree. So "because it has no effect, only it takes time" is incorrect. It is needed for the TreeView to be restored to the correct state.
Thanks!
|
|