More in this section
Forums / Developing with Sitefinity / Setting the StartingNodeUrl on the RadTreeView control

Setting the StartingNodeUrl on the RadTreeView control

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Kevin
    Kevin avatar
    38 posts
    06 Sep 2011
    08 Sep 2011
    Link to this post
    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" %>
    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;
    11.namespace SitefinityWebApp
    13.    public partial class uControls_ClaflinLeftMenu : System.Web.UI.UserControl
    14.    {
    15.       private string _StartingNodeUrl = "";
    17.        public string StartingNodeUrl
    18.        {
    19.            get
    20.            {
    21.                return _StartingNodeUrl;
    22.            }
    23.            set
    24.            {
    25.                _StartingNodeUrl = value;
    26.            }
    27.        }
    29.        protected void Page_Load(object sender, EventArgs e)
    30.        {
    31.            if (!IsPostBack)
    32.            {
    33.                this.VMenuDataSource.StartingNodeUrl = _StartingNodeUrl;
    35.            }
    36.        }
    37.    }
  2. Kevin
    Kevin avatar
    38 posts
    06 Sep 2011
    08 Sep 2011
    Link to this post
    Mysteriously, it started working and frankly I'm not certain what I did different.
2 posts, 0 answered