contenturl serverside reload

4 posts, 0 answers
  1. iomega 55
    iomega 55 avatar
    64 posts
    Member since:
    Dec 2004

    Posted 01 Oct 2009 Link to this post

    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
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 06 Oct 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tom Ray
    Tom Ray avatar
    11 posts
    Member since:
    Oct 2009

    Posted 16 Aug 2010 Link to this post

    Please give a sample of how to the the radpane to reload after the contenturl is changed on the server side.
  5. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 19 Aug 2010 Link to this post

    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
Back to Top