RadAjaxLoadingPanel problem on Button Click to show a RadGrid

2 posts, 0 answers
  1. NTR
    NTR avatar
    12 posts
    Member since:
    Oct 2012

    Posted 18 Oct 2012 Link to this post

     

    Hi Friends,

     

    I want to display ajax loading...page, when i click button to show RadGrid. Its not working when i click a button, page was going to serverside and showed the RadGrid o/p. Now again click a button its showing the ajax loading.. My question is why its not showing first time button click.  Can you please suggest me the solution.

    My Code is Below: (I am using Master Page)
    ==================
    <%@ Page Title="" Language="C#" MasterPageFile="~/Complaint.Master" AutoEventWireup="true" CodeBehind="Products.aspx.cs" Inherits="NewProducts.Products.Products" %>

     

    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

    <asp:Content ID="Content2" ContentPlaceHolderID="cph_Main" runat="server">

    <asp:Label ID="lblPageError" Text="" runat="server" ForeColor="Red"></asp:Label>

    <div id="divproducts" runat="server">

    <table width="100%" cellpadding="0" cellspacing="0" border="0">

    <tr>

    <td colspan="3">

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

    <AjaxSettings>

    <telerik:AjaxSetting AjaxControlID="btnSearch">

    <UpdatedControls>

    <telerik:AjaxUpdatedControl ControlID="customerInformation" LoadingPanelID="RadAjaxLoadingPanel1" />

    </UpdatedControls>

    </telerik:AjaxSetting>

    </AjaxSettings>

    </telerik:RadAjaxManager>

    </td>

    </tr>

    <tr>

    <td >Order ID</td>

    <td>

    <telerik:RadTextBox ID="tbOrderID" runat="server" ToolTip="Enter Order ID">

    </telerik:RadTextBox>

    </td>

    <td >

    <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" ToolTip="Click here to Search Rolls Information" /></td>

    </tr>

    <tr>

    <td align="center" align="center" colspan="3">

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" InitialDelayTime="0" MinDisplayTime="1000" Transparency="25" IsSticky="true">

    <asp:Image ID="imgRadAjaxLoadingPanel1" runat="server" ImageUrl="~/Images/loading.gif" />

    </telerik:RadAjaxLoadingPanel>

    </td>

    </tr>

    <tr>

    <td>

    <asp:UpdatePanel ID="updPnlcustomerInformation" runat="server">

    <ContentTemplate>

    <telerik:RadPanelBar runat="server" ID="rpbRollsInformation" Skin="Metro" Width="100%">

    <Items>

    <telerik:RadPanelItem Value="RollsInformation" Selected="true" Text="Roll Information" runat="server" Expanded="true">

    <ContentTemplate>

    <div id="divRollsInformation" runat="server">

    <table id="tblcustomerInformation" runat="server" width="100%" cellpadding="0" cellspacing="0" border="0">

    <tr>

    <td>

    <telerik:RadGrid ID="customerInformation" runat="server" AutoGenerateColumns="false" CellPadding="0" CellSpacing="0" GridLines="None" CssClass="RadGrid_CBGrid" Skin="Metro" HorizontalAlign="Left" FooterStyle-BorderColor="Black" AutoGenerateHierarchy="true" OnItemDataBound="customerInformation_ItemDataBound">

    <MasterTableView>

    <NestedViewTemplate>

    <uc:Comments ID="orders" runat="server" />

    </NestedViewTemplate>

    <Columns>

    <telerik:GridTemplateColumn DataField="ID" FilterControlAltText="Filter ID column" HeaderText="ID" UniqueName="ID">

    <HeaderStyle HorizontalAlign="Center" />

    <ItemStyle HorizontalAlign="Center" />

    <ItemTemplate>

    <asp:Label ID="lblID" runat="server" Text='<%# Bind("ID") %>'></asp:Label>

    </ItemTemplate>

    </telerik:GridTemplateColumn>

    <telerik:GridTemplateColumn DataField="Date" FilterControlAltText="Filter Date column" HeaderText="Date" UniqueName="Date">

    <HeaderStyle HorizontalAlign="Center" />

    <ItemStyle HorizontalAlign="Center" />

    <ItemTemplate>

    <asp:Label ID="lblDate" runat="server" Text='<%# Bind("Date") %>'></asp:Label>

    </ItemTemplate>

    </telerik:GridTemplateColumn>

    <telerik:GridTemplateColumn DataField="order_id" FilterControlAltText="Filter order_id column" HeaderText="Order" UniqueName="order_id">

    <HeaderStyle HorizontalAlign="Center" />

    <ItemStyle HorizontalAlign="Center" />

    <ItemTemplate>

    <asp:Label ID="lblorder_id" runat="server" Text='<%# Bind("order_id") %>'></asp:Label>

    </ItemTemplate>

    </telerik:GridTemplateColumn>

    <telerik:GridTemplateColumn HeaderText="Product Type">

    <HeaderStyle HorizontalAlign="Center" />

    <ItemStyle HorizontalAlign="Center" />

    <ItemTemplate>

    <telerik:RadComboBox ID="cboProduct" runat="server" AutoPostBack="true" OnSelectedIndexChanged="cboProduct_OnSelectedIndexChanged">

    </telerik:RadComboBox>

    <asp:Label ID="lblProduct" Visible="false" runat="server" Text='<%# Bind("product") %>'></asp:Label>

    <asp:CompareValidator runat="server" ID="CompaValcboProduct" ValueToCompare="-Select-" Operator="NotEqual" ControlToValidate="cboProduct" ErrorMessage="Select ProductType" Text="*" ValidationGroup="Save" ForeColor="Red" Visible="false" />

    <telerik:RadTextBox ID="tbProduct" runat="server" Visible="false">

    </telerik:RadTextBox>

    <asp:RequiredFieldValidator ID="rfvtbProduct" runat="server" ControlToValidate="tbProduct" ValidationGroup="Save" ErrorMessage="Enter Procuct Type" Text="*" ForeColor="Red" Enabled="false"></asp:RequiredFieldValidator>

    </ItemTemplate>

    </telerik:GridTemplateColumn>

    </Columns>

    </MasterTableView>

    <ClientSettings EnableRowHoverStyle="true">

    <%--<Scrolling AllowScroll="true" SaveScrollPosition="true" UseStaticHeaders="true" />--%>

    </ClientSettings>

    </telerik:RadGrid>

    </td>

    </tr>

    </table>

    </div>

    </ContentTemplate>

    </telerik:RadPanelItem>

    </Items>

    </telerik:RadPanelBar>

    </ContentTemplate>

    </asp:UpdatePanel>

    </td>

    </tr>

    </table>

    </div>

    </asp:Content>

    Thanks,
    NTR

  2. Eyup
    Admin
    Eyup avatar
    4076 posts

    Posted 23 Oct 2012 Link to this post

    Hi NTR,

    Please note that using RadAjaxManager simultaneously with RadAjaxPanel or UpdatePanel ( or implementing multiple wrapped RadAjaxPanels ) is not a supported scenario and we highly recommend to avoid such implementation. Please either use just the manager to update your controls replacing the UpdatePanel with a regular asp:Panel, or use the UpdatePanel alone to wrap your page.

    Furthermore, if you are using a complex scenario like WebUserControls or Master/ContentPages, we recommend you to place RadAjaxManager instance on the main/master page and add a proxy control to the user control/content page as described in the following help topic:
    RadAjax and MasterPage

    I hope this will prove helpful. Please make the suggested modifications and let me know about the result.

    All the best,
    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.
Back to Top