Setting the StartingNodeUrl on the RadTreeView control

Posted by Community Admin on 04-Aug-2018 04:06

Setting the StartingNodeUrl on the RadTreeView control

All Replies

Posted by Community Admin on 08-Sep-2011 00:00

I'm working on a custom tree view menu that used the RadTreeView component.  I've created an user control, which I include in my pages.  When I add the control to a page, I need to set the StartingNodeUrl to a specific url, but cannot. There is a StartingNodeUrl option in the "Edit" menu for the widget when I edit the page, but it seems to do nothing.  My only other solution is to create multiple user controls with each one set to a different StartingNodeUrl.

Any suggestions?

1.<%@ Control Language="C#" AutoEventWireup="true" CodeFile="VerticalMenu.ascx.cs" Inherits="SitefinityWebApp.VerticalMenu" %>
2. 
3.<asp:SiteMapDataSource runat="server" id="VMenuDataSource" ShowStartingNode="false"/>
4.<telerik:RadMenu runat="server" ID="VMenu" Flow="Vertical" DataSourceID="VMenuDataSource" EnableEmbeddedSkins="false" Skin="VMenuSkin" Width="280px" CssClass="LeftMenuTest"></telerik:RadMenu>

01.using System;
02.using System.Collections.Generic;
03.using System.ComponentModel;
04.using System.Linq;
05.using System.Web;
06.using System.Web.UI;
07.using System.Web.UI.WebControls;
08.using Telerik.Web.UI;
09.using Telerik.Sitefinity.Web;
10. 
11.namespace SitefinityWebApp
12.
13.    public partial class uControls_ClaflinLeftMenu : System.Web.UI.UserControl
14.    
15.       private string _StartingNodeUrl = "";
16. 
17.        public string StartingNodeUrl
18.        
19.            get
20.            
21.                return _StartingNodeUrl;
22.            
23.            set
24.            
25.                _StartingNodeUrl = value;
26.            
27.        
28. 
29.        protected void Page_Load(object sender, EventArgs e)
30.        
31.            if (!IsPostBack)
32.            
33.                this.VMenuDataSource.StartingNodeUrl = _StartingNodeUrl;
34.                 
35.            
36.        
37.    
38.

Posted by Community Admin on 08-Sep-2011 00:00

Mysteriously, it started working and frankly I'm not certain what I did different.

This thread is closed