Good Day,
I am using a RadTreeview bound to a RadSiteMapDataSource configured as below.
The sitemap's data represents a simple hierarchy of something like:
parent1---
--child1
--child2
parent2---
---child1
---child2
There are other pages that exist beyond the child pages that are not represented in the sitemap, since they should not be selected from the nav menu. The problem exists when navigating beyond the child page to an unmapped page. The RadTreeview basically doesn't know which node was previously selected & therefore looses focus on the current selected node.
This seems to be a common problem with treeview controls since by default they don't persist using the session and is well documented in the wicked code article here: http://msdn.microsoft.com/en-us/magazine/cc163598.aspx in the section named SiteMapPaths and Unmapped Pages.
I would like to configure the radtreeview to remember the currently selected node. Basically when the user navigates off of the last mapped child page, I'd like that last mapped child node to stay highlighted in the radtreeview.
I found a past forum post here: http://www.telerik.com/community/forums/aspnet/treeview/how-do-i-maintain-treeview-state-after-postback.aspx where it mentioned using the RetainScrollPosition attribute, but I cannot find any reference to it in the current release. Based on that thread, it appeared that it did exactly what I was looking for...
Any advise on how to accomplish this using the current radtreeview?
I am using a RadTreeview bound to a RadSiteMapDataSource configured as below.
<
telerik:RadSiteMapDataSource
ID
=
"SiteMapDataSource1"
runat
=
"server"
ShowStartingNode
=
"false"
/>
<
telerik:RadTreeView
ID
=
"SiteTree"
runat
=
"server"
DataSourceID
=
"SiteMapDataSource1"
EnableViewState
=
"true"
SingleExpandPath
=
"true"
>
<
ExpandAnimation
Type
=
"OutQuart"
Duration
=
"300"
/>
<
CollapseAnimation
Type
=
"OutQuint"
Duration
=
"200"
/>
</
telerik:RadTreeView
>
The sitemap's data represents a simple hierarchy of something like:
parent1---
--child1
--child2
parent2---
---child1
---child2
There are other pages that exist beyond the child pages that are not represented in the sitemap, since they should not be selected from the nav menu. The problem exists when navigating beyond the child page to an unmapped page. The RadTreeview basically doesn't know which node was previously selected & therefore looses focus on the current selected node.
This seems to be a common problem with treeview controls since by default they don't persist using the session and is well documented in the wicked code article here: http://msdn.microsoft.com/en-us/magazine/cc163598.aspx in the section named SiteMapPaths and Unmapped Pages.
I would like to configure the radtreeview to remember the currently selected node. Basically when the user navigates off of the last mapped child page, I'd like that last mapped child node to stay highlighted in the radtreeview.
I found a past forum post here: http://www.telerik.com/community/forums/aspnet/treeview/how-do-i-maintain-treeview-state-after-postback.aspx where it mentioned using the RetainScrollPosition attribute, but I cannot find any reference to it in the current release. Based on that thread, it appeared that it did exactly what I was looking for...
Any advise on how to accomplish this using the current radtreeview?