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

contenturl serverside reload

3 Answers 76 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
iomega 55
Top achievements
Rank 1
iomega 55 asked on 01 Oct 2009, 05:52 AM
Hi:

How can I reload the radpane content serverside?

I have this
<telerik:RadPane ID="sp1Restricted01" runat="server" Width="100%" Height="100%" ContentUrl="ePageBase01.aspx?a=1"
            </telerik:RadPane> 
        </telerik:RadSplitter> 

Using a combobox I load the content of the RadPane with:

ePageBase01.aspx?a=2
ePageBase01.aspx?a=3

Does it exist a form I can reload the RadPane content serverside, so I can reload the same content. So If I have ePageBase01.aspx?a=2 in the contenturl value, I need to reload the same value of contenturl, ePageBase01.aspx?a=2

3 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 06 Oct 2009, 11:35 AM
Hi iomega 55,
When you use the ContentUrl property of the RadPane, the pane creates an IFRAME element and opens the page in this IFRAME. That is why, in this case, you can use any approach with the RadPane, that would work with a standard IFRAME element.

Regards,
Tsvetie
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Tom Ray
Top achievements
Rank 1
answered on 16 Aug 2010, 01:44 PM
Please give a sample of how to the the radpane to reload after the contenturl is changed on the server side.
0
Tsvetie
Telerik team
answered on 19 Aug 2010, 12:41 PM
Hi Tom Ray,
In case you have ajaxified the button that changes the ContentUrl property of the RadPane control, you need to make sure that this control (RadPane) is actually updated during the AJAX request. Otherwise, the server-side changes you make to that control will not take effect.

For example, in case you are using a RadAjaxManager control, you have to use the following AjaxSetting:
Copy Code
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Button1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadSplitter1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadSplitter ID="RadSplitter1" runat="server">
        <telerik:RadPane ID="RadPane1" runat="server">
            <asp:Button ID="Button1" runat="server" Text="Change url" OnClick="Button1_Click" />
        </telerik:RadPane>
        <telerik:RadPane ID="RadPane2" runat="server" ContentUrl="http://www.google.com"></telerik:RadPane>
    </telerik:RadSplitter>
    </form>
</body>

On the other hand, in case you do not want to update the whole splitter, you can change the value of the property client-side, using the ResponseScripts collection of the manager:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="Button1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Button1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadSplitter ID="RadSplitter1" runat="server">
    <telerik:RadPane ID="RadPane1" runat="server">
        <asp:Button ID="Button1" runat="server" Text="Change url" OnClick="Button1_Click" />
    </telerik:RadPane>
    <telerik:RadPane ID="RadPane2" runat="server" ContentUrl="http://www.google.com"></telerik:RadPane>
</telerik:RadSplitter>


protected void Button1_Click(object sender, EventArgs e)
{
    //RadPane2.ContentUrl = "http://www.yahoo.com";
 
    RadAjaxManager1.ResponseScripts.Add(String.Format("$find('{0}').set_contentUrl('{1}');", RadPane2.ClientID, "http://www.yahoo.com"));
}


Sincerely yours,
Tsvetie
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
Tags
Splitter
Asked by
iomega 55
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Tom Ray
Top achievements
Rank 1
Share this question
or