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

RadGrid1 - RadGrid1Panel

2 Answers 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 11 Jan 2012, 03:04 AM
Hello!  I have two projects running the same setup for a couple of RadGrids.  One of the projects generates a new tag in the browser called RadGridPanel1, the other does not.  The one that does not experiences a Javascript crash with this error:

Uncaught Sys.InvalidOperationException: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_ContentPlaceHolder1_ctl00_ContentPlaceHolder1_RadGrid1Panel'. If it is being updated dynamically then it must be inside another UpdatePanel. 

Here is the code block for both projects, exactly the same.

<telerik:radajaxpanel id="RadAjaxPanel1" runat="server" clientevents-onrequeststart="conditionalPostback">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel  ID="RadAjaxLoadingPanel1" runat="server"
        BackColor="#CCCCCC" Transparency="30" HorizontalAlign="Center" BorderStyle="NotSet">
        <div style="margin: 0 auto; padding-top: 50px;"><img src="../images/ajax-loader.gif" alt="Loading..." border="0" /></div>
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="true" AllowAutomaticUpdates="true" AllowPaging="true"
        AllowFilteringByColumn="true" AllowSorting="true" OnDeleteCommand="DeleteUser" OnUpdateCommand="UpdateUser"
        PageSize="20" OnEditCommand="EditUser" OnNeedDataSource="RadGrid1_NeedDataSource" OnInsertCommand="InsertUser"
        AllowAutomaticInserts="true" Width="100%" Skin="Sunset">
        <PagerStyle Mode="NextPrevAndNumeric" />
        <MasterTableView DataKeyNames="ID"  AutoGenerateColumns="false" CommandItemDisplay="Top">


The client-side page generated differs for both of them in one element only.  Here is the output:

<div id="ctl00_ContentPlaceHolder1_ctl00_ContentPlaceHolder1_RadAjaxPanel1Panel" style="display: block; ">
    <div id="ctl00_ContentPlaceHolder1_RadAjaxPanel1">
        <!-- 2010.3.1317.40 -->
    <div id="ContentPlaceHolder1_RadAjaxManager1SU" style="display: block; ">
            <span id="ctl00_ContentPlaceHolder1_RadAjaxManager1" style="display:none;"></span>
        </div>
    <div id="ContentPlaceHolder1_RadAjaxLoadingPanel1" style="display:none;background-color:#CCCCCC;text-align:center;">
             
        <div style="margin: 0 auto; padding-top: 50px;"><img src="../assets/ajax-loader.gif" alt="Loading..." border="0"></div>
     
        </div>
    <div id="ctl00_ContentPlaceHolder1_ctl00_ContentPlaceHolder1_RadGrid1Panel" style="display: block; ">
            <div id="ctl00_ContentPlaceHolder1_RadGrid1" class="RadGrid RadGrid_Default" tabindex="0">
 
            <table cellspacing="0" class="rgMasterTable" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00" style="width:100%;table-layout:auto;empty-cells:show;">

The problem is with this one line:

<div id="ctl00_ContentPlaceHolder1_ctl00_ContentPlaceHolder1_RadGrid1Panel" style="display: block; ">

Which is only generated for one of the projects.  It is a div wrapper around the entire RadGrid1 construct.  I imagine it is some form of Update Panel.  However, neither project has any UpdatePanel defined, neither in their own source or their Master file.

So I am at a bit of a loss.  Help? =)

2 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 1
answered on 11 Jan 2012, 03:29 AM
And a VERY interesting part.  This only happens in the middle of the day.  In the evening, that RadGrid1Panel generates just fine.

It is hosted through GoDaddy.
0
Iana Tsolova
Telerik team
answered on 11 Jan 2012, 06:06 AM
Hello,

Reviewing the code I find two mistakes:
- You should avoid ajaxifying the same page content with more than one ajax controls at the same time. For instance, if you want to ajaxify a grid, you should either use RadAjaxPanel or RadAjaxManager, but never both.
- You should never ajaxify the RadAjaxManager and this can make it now working properly.

So in your case, please remove the RadAjaxPanel and see if this helps.

Greetings,
Iana Tsolova
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
Grid
Asked by
Kevin
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or