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

Update the RadAjaxManager on condition.

1 Answer 84 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lakshman
Top achievements
Rank 1
Lakshman asked on 04 Apr 2012, 03:16 PM
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();
        }


1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 09 Apr 2012, 09:38 AM
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.
Tags
General Discussions
Asked by
Lakshman
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or