NavigateUrl and Target settings appear broken

6 posts, 0 answers
  1. Chris Williams
    Chris Williams avatar
    63 posts
    Member since:
    Oct 2004

    Posted 20 Dec 2007 Link to this post

    In the legacy TreeView, you could set the NavigateUrl and Target properties on a Node.  When used in conjunction with the RadSplitter, you could load content into a specific RadPane by using these settings on a Node  This appears to be broken in the just-released Q3 version.

    For example, in this example, when you click on one of the TreeViewNodes, the entire page gets replaced by the NavigateURL setting.  You would expect that the content gets directed into the Content pane.


    telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Vertical" Width="700" Height="500">

    <telerik:RadPane ID="Tree" runat="server" Width="30%">

    <telerik:RadTreeView ID="RadTreeView1" runat="server">


    <telerik:RadTreeNode runat="server" Target="Content" Text="MSDN" NavigateUrl=""></telerik:RadTreeNode>

    <telerik:RadTreeNode runat="server" NavigateUrl="" Target="Content"






    <telerik:RadSplitBar runat="server" />

    <telerik:RadPane ID="Content" runat="server" ContentUrl="about:blank" Width="70%">



    I'll open a case.

  2. Paul
    Paul avatar
    4281 posts

    Posted 21 Dec 2007 Link to this post

    Hello Chris,

    Actually, we admit it's a bug in the control. I have reported it to our dev team and they will fix it ASAP. Meanwhile you can set the target attribute for the nodes in code behind. Here's a sample code snippet that show the approach.

    <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server">  
        <telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Vertical" Width="700" Height="500">  
            <telerik:RadPane ID="Tree" runat="server" Width="30%">  
                <telerik:RadTreeView ID="RadTreeView1" runat="server">  
                        <telerik:RadTreeNode runat="server" Text="MSDN" NavigateUrl="">  
                        <telerik:RadTreeNode runat="server" Text="Google" NavigateUrl="">  
            <telerik:RadSplitBar ID="RadSplitBar1" runat="server" /> 
            <telerik:RadPane ID="Content123" runat="server" Width="70%" ContentUrl="about:blank">  

    protected void Page_Load(object sender, EventArgs e)  
        foreach (RadTreeNode myNodes in RadTreeView1.GetAllNodes())  
            myNodes.Attributes["target"] = "Content123";  

    All the best,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. ashalan
    ashalan avatar
    10 posts
    Member since:
    Feb 2007

    Posted 30 Dec 2007 Link to this post

    Setting the .Target attribute in code behind when using Load On Demand has no effect either.

    Using .Attributes["target"], however, works just fine.
  4. Mark
    Mark avatar
    9 posts
    Member since:
    Feb 2011

    Posted 17 Feb 2011 Link to this post


    I know this is an old thread, but I'm having the same problem with RadControls for ASP.NET AJAX Q3 2010 Net35. 

    Here is my aspx page:

    <telerik:radsplitter id="RadSplitter1" runat="server" height="100%" width="100%">
                    <telerik:RadPane runat="server" ID="RadPane1" Width="30%" BackColor="#F2F3F7">
                        <telerik:RadTreeView ID="RadTreeView1" runat="server" Skin="Office2007"
                            CollapseAnimation-Type="Linear" CollapseAnimation-Duration="800"
                            ExpandAnimation-Type="Linear" ExpandAnimation-Duration="800"
                    <telerik:RadSplitBar runat="server" ID="RadSplitbar1" CollapseMode="Forward" />
                    <telerik:RadPane runat="server" ID="Radpane2" Width="70%">
                        Right Pane

    and here is my code-behind that loads the treeview control:

    foreach (string file in files)
       RadTreeNode node = new RadTreeNode(Path.GetFileName(file));
       node.NavigateUrl = virtualPath + "/" + Path.GetFileName(file);
       node.Attributes["target"] = Radpane2.ClientID;
       string extension = Path.GetExtension(file).ToLower().TrimStart('.');
       node.ImageUrl = "~/Images/html.png";

    Here's what I see when I view source:

    <div class="rtBot  rtSelected">
        <span class="rtSp"></span><img src="http://localhost:3226/MSC3.0Prototype/Images/html.png" alt="" class="rtImg"><a class="rtIn" target="ctl00_ContentPlaceHolder1_Radpane2" href="Help/Topics/Support.htm">Support.htm</a>

    When I click on the "Support.htm" in the treeview, the page loads, albeit in a new window. How can I get the .htm file to load in the right pane (RADPane2)?

  5. Nikolay Tsenkov
    Nikolay Tsenkov avatar
    734 posts

    Posted 21 Feb 2011 Link to this post

    Hi Chris Williams,

    Please, try setting the Target property of RadTreeNode (e.g. node.Target instead node["target"]) and let me know the results.

    Nikolay Tsenkov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  6. Mac P
    Mac P avatar
    86 posts
    Member since:
    Mar 2010

    Posted 11 May 2011 Link to this post

    Target property only works on the treeview that is not in master page. For master page the clientid generated is appended by master id so it will open in popup.

    Work around is

    foreach (RadTreeNode myNodes in TreeView.GetAllNodes())
                myNodes.Attributes["target"] = contentPane.ClientID;
Back to Top