Update the RadAjaxManager on condition.

2 posts, 0 answers
  1. Lakshman
    Lakshman avatar
    6 posts
    Member since:
    Oct 2011

    Posted 04 Apr 2012 Link to this post

    Hi,

    I am using Rad window which i am navigating other .aspx page on button click. There is a save functionality in the window, after closing. Calling this function in RadWindowManager.

    function closeRadWindow() {
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest();
            }

    the grids will be rebind. Working good with this code which mentioned below.  

    Issue : grd1 and grd2 will be in one panel1 and grd3 is in another panel2. Condition is when Panel1 only visible (Panel2 is visible false ) then getting error : 

    Microsoft JScript runtime error: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_cphContent_ctl00_cphContent_wizPageInfo_grd3Panel'. If it is being updated dynamically then it must be inside another UpdatePanel.

    Here is my code which i am using:

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grd1" UpdatePanelRenderMode="Inline" />
                        <telerik:AjaxUpdatedControl ControlID="grd2" UpdatePanelRenderMode="Inline" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grd3" UpdatePanelRenderMode="Inline" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

    Code Behind:

      protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
            {
                grd1.Rebind();
                grd2.Rebind();
                grd3.Rebind();
            }


  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 09 Apr 2012 Link to this post

    Hello,

    Note that you could not add control which is initially invisible on the page, to the RadAjaxManager settings. The initiator or the updated control should be always placed in a visible container so that the manager can locate it when necessary.
    Please review the help topic below for more information on this matter:
    http://www.telerik.com/help/aspnet-ajax/ajax-tips-and-tricks.html

    Greetings,
    Maria Ilieva
    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.
Back to Top