More in this section

Forums / Developing with Sitefinity / RadTreeView control conflict

RadTreeView control conflict

2 posts, 0 answered
  1. Liam
    Liam avatar
    18 posts
    30 Jun 2010
    08 Dec 2010
    Link to this post

    I have an issue with using two separate RadTreeView controls on a single page.

    I have a custom RadTreeView control that is used as a site menu navigation. I use a client-side load on demand approach with the menu so that appropriate nodes have their ExpandMode property set to TreeNodeExpandMode.ServerSideCallBack. This works as expected on all pages except my site map page on which I have another RadTreeView control.

    The second RadTreeView control that is on my site map page serves as the site map and is constructed by setting an appropriate SiteMapNodeCollection as its DataSource and then DataBinding. Thus the site map RadTreeView control is not set up with the load on demand approach.

    On the site map page where both RadTreeView controls exist I lose the client-side load on demand functionality from the site menu navigation control. That is, nothing happens when clicking the ‘plus’ icon on nodes that have children. The site map RadTreeView control functions correctly. That is, I can expand and collapse nodes successfully.

    Why am I getting a conflict between the two RadTreeView controls?


  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    08 Dec 2010
    Link to this post
    Hello Liam,

    Could you check whether NodeExpand event is called at your end? I checked the scenario with two controls on the same page and I am not able to replicate the issue

    protected void Page_Load(object sender, EventArgs e)
            var nodes = RadTreeview1.GetAllNodes();
            foreach (RadTreeNode n in nodes)
                n.NavigateUrl = "";
            var Manager = new CmsManager();
            RadTreeview2.DataSource = Manager.GetPages();
            RadTreeview2.DataFieldID = "ID";
            RadTreeview2.DataFieldParentID = "ParentID";
            RadTreeview2.DataTextField = "Name";
            RadTreeview2.DataValueField = "ID";
            RadTreeview2.NodeExpand += new RadTreeViewEventHandler(RadTreeview2_NodeExpand);
            var nodes2 = RadTreeview2.GetAllNodes();
            foreach (RadTreeNode n2 in nodes2)
                if (n2.Nodes.Count > 0)
                    n2.ExpandMode = TreeNodeExpandMode.ServerSideCallBack;
        protected void RadTreeview2_NodeExpand(object sender, RadTreeNodeEventArgs e)

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered