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

RadAjaxLoadingPanel persists indefinitely

5 Answers 67 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Glenn Plunkett
Top achievements
Rank 1
Glenn Plunkett asked on 28 Mar 2012, 02:33 PM
Hello,

I have a UserControl with several RadControls on it.  The control is placed in an ASPX page which uses a MasterPage.  My RadScriptManager is on the MasterPage.  Within the control I have a RadGrid used to edit some user data.  When the RadGrid initiates an Ajax postback, the RadAjaxLoadingPanel on the page fires.  The postback completes, but the RadAjaxLoadingPanel never disappears.  I have tried just about every trick I can find in the forums to no avail.  The odd thing is that if I paste the contents of the UserControl into a standalone ASPX page, it works perfectly.  The code for the UserControl follows.  What am I doing wrong?

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" >
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="pnlContent">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="pnlContent" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxPanel runat="server" ID="pnlContent">
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Skin="Vista" EnableSkinTransparency="true"
            BackgroundPosition="Center" runat="server">
        </telerik:RadAjaxLoadingPanel>
<telerik:RadGrid ID="rgList" runat="server" AutoGenerateColumns="False" DataSourceID="lds1"
    EnableAjaxSkinRendering="true" DataKeyNames="userID" CellSpacing="0" GridLines="None"
    AllowPaging="True" AllowSorting="True" OnRowUpdating="OnUpdate" EditItemStyle-BackColor="AntiqueWhite"
    AllowAutomaticUpdates="True" AllowAutomaticDeletes="True" OnDeleteCommand="OnDelete"
    PageSize="50" PagerStyle-Position="TopAndBottom">
    <MasterTableView DataSourceID="lds1" DataKeyNames="userID">
        <CommandItemSettings ExportToPdfText="Export to PDF" />
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px" />
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px" />
        </ExpandCollapseColumn>
        <AlternatingItemStyle BackColor="LightGray" />
        <EditFormSettings>
            <EditColumn UniqueName="EditCommandColumn" ButtonType="ImageButton" CancelImageUrl="~/images/cancel.jpg"
                UpdateImageUrl="~/images/save.jpg">
            </EditColumn>
        </EditFormSettings>
        <Columns>
            <telerik:GridEditCommandColumn FilterControlAltText="Filter EditCommandColumn column"
                CancelImageUrl="~/images/cancel.jpg" EditImageUrl="~/images/page_edit.gif" UpdateImageUrl="~/images/save.jpg"
                ButtonType="ImageButton">
            </telerik:GridEditCommandColumn>
            <telerik:GridBoundColumn Display="false" FilterControlAltText="Filter TemplateColumn2 column"
                UniqueName="userID" ReadOnly="true" DataField="userID">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn HeaderText="Tools" Display="false" FilterControlAltText="Filter TemplateColumn2 column"
                UniqueName="TemplateColumn2">
                <EditItemTemplate>
                    <asp:LinkButton ID="lbResetPW" runat="server" Text="Reset Password" ClientIDMode="Static"></asp:LinkButton
                      
                    <asp:LinkButton ID="lbRoles" runat="server" Text="User Roles" ClientIDMode="Static"
                        OnClick="OnShowRoles"></asp:LinkButton></EditItemTemplate>
                <ItemTemplate>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn DataField="FirstName" FilterControlAltText="Filter FirstName column"
                UniqueName="FirstName" HeaderText="First Name" SortExpression="FirstName">
                <EditItemTemplate>
                    <asp:TextBox ID="tbFirstName" runat="server" Text='<%#Bind("FirstName") %>' /><asp:RequiredFieldValidator
                        ID="rfv1" runat="server" Display="Dynamic" ControlToValidate="tbFirstName" ForeColor="Red"
                        ErrorMessage="First name is required"></asp:RequiredFieldValidator></EditItemTemplate>
                <ItemTemplate>
                    <%#Eval("FirstName") %></ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn DataField="LastName" FilterControlAltText="Filter LastName column"
                UniqueName="LastName" HeaderText="Last Name" SortExpression="LastName">
                <EditItemTemplate>
                    <asp:TextBox ID="tbLastName" runat="server" Text='<%#Bind("LastName") %>' /><asp:RequiredFieldValidator
                        ID="rfv2" runat="server" Display="Dynamic" ControlToValidate="tbLastName" ForeColor="Red"
                        ErrorMessage="Last name is required"></asp:RequiredFieldValidator></EditItemTemplate>
                <ItemTemplate>
                    <%#Eval("LastName") %></ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn DataField="EmployeeID" FilterControlAltText="Filter EmployeeID column"
                UniqueName="EmployeeID" HeaderText="EmployeeID" SortExpression="EmployeeID">
                <EditItemTemplate>
                    <asp:TextBox ID="tbEmployeeID" runat="server" Text='<%#Bind("EmployeeID") %>' /><asp:RequiredFieldValidator
                        ID="rfv3" runat="server" Display="Dynamic" ControlToValidate="tbEmployeeID" ForeColor="Red"
                        ErrorMessage="Employee ID is required"></asp:RequiredFieldValidator></EditItemTemplate>
                <ItemTemplate>
                    <%#Eval("EmployeeID") %></ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn DataField="Email" FilterControlAltText="Filter Email column"
                UniqueName="Email" HeaderText="Email" SortExpression="Email">
                <EditItemTemplate>
                    <asp:TextBox ID="tbEmail" runat="server" Text='<%#Bind("Email") %>' /><asp:RequiredFieldValidator
                        ID="rfv4" runat="server" Display="Dynamic" ControlToValidate="tbEmail" ForeColor="Red"
                        ErrorMessage="Email is required"></asp:RequiredFieldValidator></EditItemTemplate>
                <ItemTemplate>
                    <%#Eval("Email") %></ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn DataField="Branch" FilterControlAltText="Filter Branch column"
                UniqueName="Branch" HeaderText="Branch" SortExpression="Branch">
                <EditItemTemplate>
                    <asp:TextBox ID="tbBranch" runat="server" Text='<%#Bind("Branch") %>' /><asp:RequiredFieldValidator
                        ID="rfv5" runat="server" Display="Dynamic" ControlToValidate="tbBranch" ForeColor="Red"
                        ErrorMessage="Branch is required"></asp:RequiredFieldValidator></EditItemTemplate>
                <ItemTemplate>
                    <%#Eval("Branch") %></ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridCheckBoxColumn DataField="Is24" Display="False" FilterControlAltText="Filter Is24 column"
                HeaderText="24-hour Employee" SortExpression="Is24" UniqueName="Is24">
            </telerik:GridCheckBoxColumn>
            <telerik:GridTemplateColumn DataField="JobDescription" FilterControlAltText="Filter JobDescription column"
                UniqueName="JobDescription" HeaderText="Job Description" SortExpression="JobDescription">
                <EditItemTemplate>
                    <asp:TextBox ID="tbJobDescription" runat="server" Text='<%#Bind("JobDescription") %>' /><asp:RequiredFieldValidator
                        ID="rfv6" runat="server" Display="Dynamic" ControlToValidate="tbJobDescription"
                        ForeColor="Red" ErrorMessage="Job Description is required"></asp:RequiredFieldValidator></EditItemTemplate>
                <ItemTemplate>
                    <%#Eval("JobDescription") %></ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn1 column"
                Display="false" HeaderText="District" UniqueName="District">
                <EditItemTemplate>
                    <asp:DropDownList ID="ddlDistrict" runat="server" DataSourceID="lds3" DataMember=""
                        DataValueField="DistrictID" DataTextField="DistrictName" SelectedValue='<%#Bind("DistrictID") %>'
                        AppendDataBoundItems="true">
                        <asp:ListItem Value=''>- None -</asp:ListItem>
                    </asp:DropDownList>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" Display="false"
                HeaderText="District Mgr" UniqueName="DistrictMgr">
                <EditItemTemplate>
                    <asp:DropDownList ID="ddlDM" runat="server" DataSourceID="lds2" DataMember="" DataValueField="userID"
                        DataTextField="Name" SelectedValue='<%#Bind("DistrictMgr") %>' AppendDataBoundItems="true">
                        <asp:ListItem Value=''>- None -</asp:ListItem>
                    </asp:DropDownList>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn1 column"
                Display="false" HeaderText="Region" UniqueName="Region">
                <EditItemTemplate>
                    <asp:DropDownList ID="ddlRegion" runat="server" DataSourceID="lds4" DataMember=""
                        DataValueField="RegionID" DataTextField="RegionName" SelectedValue='<%#Bind("RegionID") %>'
                        AppendDataBoundItems="true">
                        <asp:ListItem Value=''>- None -</asp:ListItem>
                    </asp:DropDownList>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn1 column"
                Display="false" HeaderText="Regional Mgr" UniqueName="RegionalMgr">
                <EditItemTemplate>
                    <asp:DropDownList ID="ddlRM" runat="server" DataSourceID="lds2" DataValueField="userID"
                        DataTextField="Name" SelectedValue='<%#Bind("RegionalMgr") %>' AppendDataBoundItems="true">
                        <asp:ListItem Value=''>- None -</asp:ListItem>
                    </asp:DropDownList>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="LastUpdated" FilterControlAltText="Filter column column"
                HeaderText="Last Updated" ReadOnly="True" SortExpression="LastUpdated" UniqueName="LastUpdated">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn DataField="UpdatedBy" FilterControlAltText="Filter UpdatedBy column"
                HeaderText="Updated By" ReadOnly="True" SortExpression="UpdatedBy" UniqueName="UpdatedBy">
                <ItemTemplate>
                    <asp:Label ID="lblUdb" runat="server" Text='<%#Eval("aspnet_User3.UserName") %>'></asp:Label></ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="Delete" ItemStyle-Width="18px">
                <ItemTemplate>
                    <asp:ImageButton ID="ibDelete" runat="server" CommandName="Delete" CommandArgument='<%#Eval("userID") %>'
                        ImageUrl="~/images/delete.png" AlternateText="Delete Option" OnClientClick="return confirm('Are you sure you want to delete this user?');" />
                </ItemTemplate>
                <ItemStyle Width="18px"></ItemStyle>
            </telerik:GridTemplateColumn>
        </Columns>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
    </MasterTableView>
    <EditItemStyle BackColor="AntiqueWhite" />
    <PagerStyle Position="TopAndBottom"></PagerStyle>
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
    </HeaderContextMenu>
</telerik:RadGrid>
<asp:LinqDataSource ID="lds1" runat="server" ContextTypeName="DataClassesDataContext"
    OrderBy="LastName" TableName="UserInfos" EnableDelete="True" EnableInsert="True"
    EnableUpdate="True" OnUpdating="lds1_Updating" OnSelecting="lds1_Selecting">
</asp:LinqDataSource>
<asp:LinqDataSource ID="lds2" runat="server" ContextTypeName="DataClassesDataContext"
    OnSelecting="lds2_Selecting">
</asp:LinqDataSource>
<asp:LinqDataSource ID="lds3" runat="server" ContextTypeName="DataClassesDataContext"
    OnSelecting="lds3_Selecting">
</asp:LinqDataSource>
<asp:LinqDataSource ID="lds4" runat="server" ContextTypeName="DataClassesDataContext"
    OnSelecting="lds4_Selecting">
</asp:LinqDataSource>
<telerik:RadWindow ID="rwNewUser" runat="server" VisibleOnPageLoad="false" EnableShadow="true"
    Modal="true">
    <ContentTemplate>
        <table style="width: 100%;">
            <tr>
                <td colspan="2" style="text-align: center; font-weight: bold; border-bottom: 2px solid #6666ff;">
                    New User
                </td>
            </tr>
            <tr>
                <td>
                    Employee ID:
                </td>
                <td>
                    <asp:TextBox ID="tbNewEEID" runat="server"></asp:TextBox><asp:RequiredFieldValidator
                        ID="rfv1" runat="server" Display="Dynamic" ForeColor="Red" Font-Size="Small"
                        ControlToValidate="tbNewEEID" ErrorMessage="Please enter the new user's employeeID (this will be their login user name)."
                        ValidationGroup="valNewUser"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Password:
                </td>
                <td>
                    <asp:TextBox ID="tbNewPW" runat="server"></asp:TextBox><asp:RequiredFieldValidator
                        ID="rfv2" runat="server" Display="Dynamic" ForeColor="Red" Font-Size="Small"
                        ControlToValidate="tbNewPW" ErrorMessage="Please enter the new user's password."
                        ValidationGroup="valNewUser"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Email Address:
                </td>
                <td>
                    <asp:TextBox ID="tbNewEmail" runat="server"></asp:TextBox><asp:RequiredFieldValidator
                        ID="rfv3" runat="server" Display="Dynamic" ForeColor="Red" Font-Size="Small"
                        ControlToValidate="tbNewEmail" ErrorMessage="Please enter the new user's email address."
                        ValidationGroup="valNewUser"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <asp:Button ID="btnaddNew" runat="server" Text="Add" CssClass="cmdButton" OnClick="OnInsert"
                        ValidationGroup="valNewUser" />
                </td>
            </tr>
        </table>
    </ContentTemplate>
</telerik:RadWindow>
<telerik:RadWindow ID="rwChangePassword" runat="server" VisibleOnPageLoad="false"
    EnableShadow="true" Modal="true" OpenerElementID="lbResetPW">
    <ContentTemplate>
        <table style="width: 100%;">
            <tr>
                <td colspan="2" style="text-align: center; font-weight: bold; border-bottom: 2px solid #6666ff;">
                    Change Password
                </td>
            </tr>
            <tr>
                <td>
                    New Password:
                </td>
                <td>
                    <asp:TextBox ID="tbChPW" runat="server" Text="usb"></asp:TextBox><asp:RequiredFieldValidator
                        ID="RequiredFieldValidator1" runat="server" Display="Dynamic" ForeColor="Red"
                        Font-Size="Small" ControlToValidate="tbChPW" ErrorMessage="Please enter a password."
                        ValidationGroup="valChPw"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <asp:Button ID="btnChPw" runat="server" Text="Change" CssClass="cmdButton" OnClick="OnChangePW"
                        ValidationGroup="valChPw" OnClientClick="return confirm('Are you sure you want to reset this user\'s password?');" />
                </td>
            </tr>
        </table>
    </ContentTemplate>
</telerik:RadWindow>
<telerik:RadWindow ID="rwRoles" runat="server" VisibleOnPageLoad="false" EnableShadow="true"
    Modal="true">
    <ContentTemplate>
        <table style="width: 100%;">
            <tr>
                <td colspan="2" style="text-align: center; font-weight: bold; border-bottom: 2px solid #6666ff;">
                    Change Roles
                </td>
            </tr>
            <tr>
                <td style="vertical-align: top;">
                    Choose Roles:
                </td>
                <td>
                    <asp:RadioButtonList ID="rblMainRoles" runat="server">
                        <asp:ListItem Value="User">User</asp:ListItem>
                    </asp:RadioButtonList>
                    <hr />
                    <asp:RadioButtonList ID="rblBankRoles" runat="server">
                        <asp:ListItem Value="BranchMgr">Branch Manager</asp:ListItem>
                        <asp:ListItem Value="DistrictMgr">District Manager</asp:ListItem>
                        <asp:ListItem Value="RegionMgr">Regional Manager</asp:ListItem>
                        <asp:ListItem Value="AdminAssistant">RM/DM Admin</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <asp:Button ID="btnRoles" runat="server" Text="Change" CssClass="cmdButton" OnClick="OnChangeRoles"
                        ValidationGroup="valChPw" OnClientClick="return confirm('Are you sure you want to change this user\'s roles?');" />
                </td>
            </tr>
        </table>
    </ContentTemplate>
</telerik:RadWindow></telerik:RadAjaxPanel>
<telerik:RadScriptBlock ID="RadCodeBlock2" runat="server">
    <script type="text/javascript">
        var message = "<%=m_message %>";
        if (message != "")
            alert(message);
    </script>
</telerik:RadScriptBlock>

5 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 28 Mar 2012, 09:18 PM
Hello Glenn,

Thank you for contacting us.

Using RadAjaxManager along with RadAjaxPanel, as well as with multiple wrapped RadAjax panels, UpdatePanel or with another RadAjaxManager  is not a supported scenario and we highly recommend to avoid such implementation. 
This is actually the cause of the problem in your case.To solve it you have to remove either:
  • the RadAjaxManager and use single RadAjaxPanel to wrap the whole page content
  • the RadAjaxPanel and ajaxify your page just with RadAjaxManager

I hope this helps. Do not hesitate to turn to us if you need further assistance.

Greetings,
Eyup
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.
0
Glenn Plunkett
Top achievements
Rank 1
answered on 29 Mar 2012, 01:56 AM
Thanks for the reply.  Removing the RadAjaxPanel and using the RadAjaxManager alone solves this problem, but introduces another one.  In fact, it was this problem that led me to add the RadAjaxPanel in the first place: Now the RadAjaxLoadingPanel fires only once.  Subsequent AJAX calls don't fire the loading panel, unless I reload the page.

So now what?
0
Glenn Plunkett
Top achievements
Rank 1
answered on 30 Mar 2012, 12:23 AM
Here's what I ended up doing to fix it:
  • Remove the RadAjaxPanel
  • Move the RadAjaxManager and the RadAjaxLoadingPanel to the MasterPage
  • Set the DefaultLoadingPanelID property on the RadAjaxManager to the RadAjaxLoadingPanel

Seems to be working pretty well now.  Thanks!
0
Eyup
Telerik team
answered on 30 Mar 2012, 09:34 AM
Hi Glenn,

I'm glad you resolved the issue.
In addition you can take a look at these help articles: And at this demo which resembles your scenario:

 I believe this will be helpful. If you have further questions, feel free to contact us.

Greetings,

Eyup
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.
0
Emir
Top achievements
Rank 1
answered on 23 Aug 2012, 06:17 AM
I'd got the same problem. I've removed the connection between RadAjaxLoadingPanel and RadAjaxPanel. After than i trigged the RadAjaxLoadingPanel explicitly. It worked. Export To Excell Process does not using Loading Panel but the other process shows up Loading Panel. My problem has been solved :)
Tags
Ajax
Asked by
Glenn Plunkett
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Glenn Plunkett
Top achievements
Rank 1
Emir
Top achievements
Rank 1
Share this question
or