This is a migrated thread and some comments may be shown as answers.

Refresh RadSplitter

1 Answer 146 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Donatien
Top achievements
Rank 1
Donatien asked on 29 Sep 2011, 01:42 PM
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

1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 03 Oct 2011, 12:19 PM
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
Tags
Splitter
Asked by
Donatien
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Share this question
or