|
Rank: Newbie Groups: Member
Joined: 9/29/2009 Posts: 5
|
Hi Support, I have a site with a treeview. (-: When user click on the node (both name and the + sign) the tree autoexpand. This is ok. I then decided to add navigation url to the node, then the autoexpand stoped working, when the user click the node name. Only when the user click the + sign the tree expand. Is this normal when inserting a navigation url ?
asp.net 2.0 <eo:TreeView ID="TreeView1" runat="server" Width="100%" Height="100%" SingleExpandMode="AllLevels" EnableViewState="False" StateCookieName="myTreeKage" EnableKeyboardNavigation="True" AutoCheckParent="True" AutoCollapseOnClick="true" AutoExpandOnClick="true" SaveStateCrossPages="true"> <TopGroup Style-CssText="cursor:hand;"> <Nodes> <eo:TreeNode ItemID="_Default" RaisesServerEvent="True" PopulateOnDemand="true"> </eo:TreeNode> </Nodes> </TopGroup> </eo:TreeView>
Regards Torben
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
This is normal. AuotExpand occurs after click, which also handles NavigateUrl. So by the time AutoExpand is checked, the browser already moved to another page.
I believe you can handle the TreeView's ClientSideOnItemClick event and call the node's setExpanded method to expand the node. That should expand the node before it browser navigates to the new page, thus carries the state to the new page.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 9/29/2009 Posts: 5
|
Hi, Sorry for the late responce on this issue. It sounds correct that I need a Clientside event. I have not been working with scripts before, so does anybody have an exampel for the java script for this issue ?
Thanks in advance. Torben
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
|
|
Rank: Newbie Groups: Member
Joined: 9/29/2009 Posts: 5
|
Hi Support, Thanks, Supert, just whap I needed, it is now working. Regards, Torben
|
|