External content in NestedSplitter

3 posts, 0 answers
  1. HSLaw
    HSLaw avatar
    153 posts
    Member since:
    Jan 2006

    Posted 06 Feb 2009 Link to this post

    Hi,
    Below is my code trying to open google in the contenpane but it opens in new window instead.
    what did I do wrong here?

    <div id="ParentDivElement" style="height: 100%;">  
            <telerik:radsplitter id="MainSplitter" runat="server" height="100%" width="100%" 
                orientation="Horizontal" skin="Outlook">  
                  
                <telerik:RadPane ID="TopPane" runat="server" Height="100" MinHeight="85" MaxHeight="150" 
                    Scrolling="none">  
                    <!-- Place the content of the pane here --> 
                </telerik:RadPane> 
                  
                <telerik:RadSplitBar ID="RadsplitbarTop" runat="server" CollapseMode="Forward" /> 
                  
                <telerik:RadPane ID="MainPane" runat="server" Scrolling="none" MinWidth="500">  
                      
                    <telerik:RadSplitter ID="NestedSplitter" runat="server" Skin="Web20" LiveResize="true">  
                          
                        <telerik:RadPane ID="LeftPane" runat="server" Width="300" MinWidth="150" MaxWidth="400">  
                            <!-- Place the content of the pane here --> 
                             <href="http://google.com" target="<%= contentPane.ClientID%>">  
                            Open google.com</a> 
                        </telerik:RadPane> 
                          
                        <telerik:RadSplitBar ID="VerticalSplitBar" runat="server" CollapseMode="Forward" /> 
                          
                        <telerik:RadPane ID="ContentPane" runat="server">  
                            <!-- Place the content of the pane here --> 
                        </telerik:RadPane> 
                          
                    </telerik:RadSplitter> 
                      
                </telerik:RadPane> 
            </telerik:radsplitter> 
        </div> 
  2. HSLaw
    HSLaw avatar
    153 posts
    Member since:
    Jan 2006

    Posted 06 Feb 2009 Link to this post

    It is working after I add a default contentURL. But when I use treeview, it is not working. (Text="<a href='http://www.yahoo.com' target='<%=ContentPane.clientid %>'>Root RadTreeNode3</a>">)


    Here is my code:

    <div id="ParentDivElement" style="height: 100%;">  
            <telerik:radsplitter id="MainSplitter" runat="server" height="100%" width="100%"   
                orientation="Horizontal" LiveResize="true" Skin="Web20" > 
                  
                <telerik:RadPane  ID="TopPane" runat="server" Height="100" MinHeight="85" MaxHeight="150" 
                    Scrolling="none">  
                    <!-- Place the content of the pane here --> 
                </telerik:RadPane> 
                  
                <telerik:RadSplitBar ID="RadsplitbarTop" runat="server" CollapseMode="Forward" /> 
                  
                <telerik:RadPane ID="MainPane" runat="server" Scrolling="none" MinWidth="500">  
                      
                    <telerik:RadSplitter ID="NestedSplitter" runat="server" Skin="Web20" LiveResize="true">  
                          
                        <telerik:RadPane ID="LeftPane" runat="server" Width="300" MinWidth="150" MaxWidth="400">  
                            <!-- Place the content of the pane here --> 
                            <href='http://www.yahoo.com' target='<%=ContentPane.clientid %>'>Root RadTreeNode3</a> 
                             <telerik:RadTreeView  
       ID="RadTreeView1" 
       runat="server" 
       LoadingStatusPosition="BeforeNodeText" 
       Width="200px">  
      <Nodes> 
          <telerik:RadTreeNode runat="server" ExpandMode="ClientSide" Text="Root RadTreeNode1 Root RadTreeNode1 Root RadTreeNode1 Root RadTreeNode1" style="white-space:normal">  
          </telerik:RadTreeNode> 
          <telerik:RadTreeNode runat="server" ExpandMode="ClientSide" Text="Root RadTreeNode2">  
          </telerik:RadTreeNode> 
          <telerik:RadTreeNode runat="server" ExpandMode="ClientSide" Text="<a href='http://www.yahoo.com' target='<%=ContentPane.clientid %>'>Root RadTreeNode3</a>">  
          </telerik:RadTreeNode> 
      </Nodes> 
      <CollapseAnimation Duration="100" Type="OutQuint" /> 
      <ExpandAnimation Duration="100" Type="OutQuart" /> 
    </telerik:RadTreeView>   
                        </telerik:RadPane> 
                          
                        <telerik:RadSplitBar ID="VerticalSplitBar" runat="server" CollapseMode="Forward" /> 
                          
                        <telerik:RadPane ID="ContentPane" contenturl="http://blogs.telerik.com" runat="server">  
                            <!-- Place the content of the pane here --> 
                        </telerik:RadPane> 
                          
                    </telerik:RadSplitter> 
                      
                </telerik:RadPane> 
            </telerik:radsplitter> 
        </div> 
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 09 Feb 2009 Link to this post

    Hi Paladin,
    Yes, you need to initially set the ContentUrl of the RadPane, so that it creates an IFRAME element, in which the links open.

    As for the problem with the RadTreeVuew - first of all, please do not use:
    <telerik:RadTreeNode runat="server" ExpandMode="ClientSide" Text="<a href='http://www.yahoo.com' target='<%=ContentPane.clientid %>'>Root RadTreeNode3</a>">   
    </telerik:RadTreeNode> 

    The correct way is to use the NavigateUrl property of the RadTreeNode:
    <telerik:RadTreeNode runat="server" ExpandMode="ClientSide" NavigateUrl="http://www.yahoo.com"  
        Target="<%= ContentPane.ClientID %>" Text="Root RadTreeNode3"
    </telerik:RadTreeNode> 

    When you user server controls (e.g. you have runat="server"), in most cases the expression between the server tags is not evaluated. Have a look at the HTML that is rendered:
    <li class="rtLI rtLast"
        <div class="rtBot"
            <span class="rtSp"></span> 
            <class="rtIn" href="http://www.yahoo.com" target="<%= ContentPane.ClientID %>">Root RadTreeNode3</a> 
        </div> 
    </li> 

    That is why, you have to set the Target of the RadTreeNode on the server. For example:
    <telerik:RadTreeNode runat="server" ExpandMode="ClientSide" NavigateUrl="http://www.yahoo.com"  
        Text="Root RadTreeNode3"
    </telerik:RadTreeNode> 

    code-behind:
    protected void Page_Load(object sender, EventArgs e) 
        RadTreeNode node = RadTreeView1.FindNodeByText("Root RadTreeNode3"); 
        node.Target = ContentPane.ClientID; 

    Best wishes,
    Tsvetie
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top