Refresh RadSplitter

2 posts, 0 answers
  1. Donatien
    Donatien avatar
    12 posts
    Member since:
    Jun 2011

    Posted 29 Sep 2011 Link to this post

    Hello,

    I have 2 RadSplitter with 1 RadPane inside each.
    The first RadPane is loading a page which contains a RadTabStrip.
    The second RadPane is loading an URL.

    Is it possible to refresh the second RadPane or RadSplitter when I modifi the tab on the RadTabStrip?

    Thank you for your help.


    Donatien
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 03 Oct 2011 Link to this post

    Hi Donatien,

    The described configuration, RadSplitter with a single RadPane, is not officially supported and it is highly not recommended to be used. Could you please describe in more details the exact scenario and why do you need this exact configuration?

    Now to your quesition, you can set a new URL to be loaded in the pane using its set_contentUrl() client-side method, e.g.:
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" OnClientTabSelected="OnClientTabSelected">
        <Tabs>
            <telerik:RadTab Text="Tab1" Selected="true"></telerik:RadTab>
            <telerik:RadTab Text="Tab2"></telerik:RadTab>
            <telerik:RadTab Text="Tab3"></telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
     
    <telerik:RadSplitter ID="RadSplitter1" runat="server">
        <telerik:RadPane ID="RadPane1" runat="server" Collapsed="true">
        </telerik:RadPane>
        <telerik:RadPane ID="RadPane2" runat="server" ContentUrl="http://www.telerik.com">
        </telerik:RadPane>
    </telerik:RadSplitter>
     
    <script type="text/javascript">
        function OnClientTabSelected(tabStrip, args)
        {
            var tabText = args.get_tab().get_text();
     
            var splitter = $find("<%= RadSplitter1.ClientID %>");
            var pane = splitter.getPaneById("<%= RadPane2.ClientID %>");
            switch (tabText) {
                case "Tab1":
                    pane.set_contentUrl("http://www.telerik.com")
                    break;
                case "Tab2":
                    pane.set_contentUrl("http://www.msdn.com")
                    break;
                case "Tab3":
                    pane.set_contentUrl("http://www.bing.com")
                    break;
            }
        }
    </script>

    You can find more detailed information regarding the RadSplitter and its sub controls client-side APIs in the following help article:
    Client-Side Basics

    Regards,
    Dobromir
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top