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

Loading Panel not showing on Grid Page_Load

7 Answers 314 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lynn
Top achievements
Rank 2
Lynn asked on 23 Nov 2011, 11:20 PM
I have a grid with a loading panel.  When I apply a new filter or sort the grid by clicking on one of the column headers, the loading panel graphic shows just fine.

But during page load, the loading panel graphic never shows, even though the page takes a few seconds to load (it actually takes more time than sorting or filtering).

The .aspx code for the page is shown below.  The code behind follows.

Thanks in advance!

Lynn
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/EPSDev3.master" AutoEventWireup="true" CodeFile="PetitionInfo.aspx.cs" Inherits="PetitionInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
    .VerticalAlign1 
    
        padding-top: 6px;
    }
        .style1
        {
            height: 31px;
        }
        .RadGrid_Default .rgHeaderDiv
        {
            width: 785px !important;
        }
 
        .RadGrid_Default .rgFooterDiv
        {
            width: 785px !important;
        }
</style>
 </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
      <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        <!-- content start -->
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="SignersGrid">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="SignersGrid" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" AlternateText="Loading..." Skin="Black" runat="server"  />
    <div style="width: 800px;">
        <div style="float: left; background-color: White; padding: 0px;">
            <table cellpadding="1" cellspacing="0" border="0" >
                <tr>
                    <td colspan="5" align="center" >
                        <h2>
                            <asp:Label ID="VoterAuthenticationLabel" runat="server" Text="<%$ Resources:Resource, PetitionInformationLabel %>"></asp:Label>
                        </h2>
                    </td>
                </tr>
                <tr>
                    <td width="2%">
                          
                    </td>
                    <td width="47%" valign="top">
                        <table >
                            <tr>
                                <td colspan="2" align="left" style="font-weight: normal; height: 12px;">
                                    <asp:Label ID="Label6" runat="server" Font-Bold="true" Text="<%$ Resources:Resource, CandidateInformationLabel%>"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="CycleLabel" runat="server" Text="<%$ Resources:Resource, CycleLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="ElectionCycleList" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label1" runat="server" Text="<%$ Resources:Resource, RaceLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="PoliticalRaceList" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label2" runat="server" Text="<%$ Resources:Resource, NameLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="CandidateName" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label3" runat="server" Text="<%$ Resources:Resource, AddressLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="CandidateAddress" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label4" runat="server" Text="<%$ Resources:Resource, CityStZipLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="CandidateCity" runat="server" Text=""></asp:Label>
                                       
                                    <asp:Label ID="CandidateState" runat="server" Text=""></asp:Label>
                                       
                                    <asp:Label ID="CandidateZipCode" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label5" runat="server" Text="<%$ Resources:Resource, CountyLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="CandidateCountyList" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="2%">
                          
                    </td>
                    <td width="47%"  valign="top">
                        <table width="100%">
                            <tr>
                                <td colspan="2" align="left" style="font-weight: normal; height: 12px;">
                                    <asp:Label ID="Label7" runat="server" Font-Bold="true" Text="<%$ Resources:Resource, ContactInformationLabel%>"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label8" runat="server" Text="<%$ Resources:Resource, NameLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="ContactName" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label9" runat="server" Text="<%$ Resources:Resource, PhoneLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="ContactPhone" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label10" runat="server" Text="<%$ Resources:Resource, EmailLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="ContactEmailAddress" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label11" runat="server" Text="<%$ Resources:Resource, WebSiteLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="ContactWebSiteURL" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label16" runat="server" Text="<%$ Resources:Resource, LinkToLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="LinkToURL" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="2%">
                          
                    </td>
                </tr>
                <tr>
                    <td colspan="5">
                          
                    </td>
                </tr>
                <tr >
                    <td>
                          
                    </td>
                        <td align="center" valign="middle" colspan="3" >
                            <asp:Label CssClass="VerticalAlign1" ID="PetitionsListTitle" Font-Size="16px" Width="100%" BackColor="#565A43" Height="24px" ForeColor="#ffffff" Font-Bold="true" runat="server" Text="<%$ Resources:Resource, PetitionSignersLabel %>"></asp:Label>
                        </td>
                    <td>
                          
                    </td>
                </tr>
                <tr>
                    <td width="2%">
                          
                    </td>
                    <td colspan="3" valign="middle">
                        <telerik:RadGrid AutoGenerateColumns="false" ID="SignersGrid" runat="server" Width="785px"
                            AllowSorting="true" AllowFilteringByColumn="true" EnableLinqExpressions="true"
                            AllowPaging="false" PageSize="15" CommandItemDisplay="Bottom"
                            BorderWidth="1px" BorderColor="#999999" EnableEmbeddedSkins="true" Skin="Default"
                            DataSourceID="SQLDataSource1"
                            ShowStatusBar="true"
                            ShowFooter="false" GridLines="None" >
                            <PagerStyle Mode="NextPrevAndNumeric" />
                            <GroupingSettings CaseSensitive="false" />
                            <StatusBarSettings ReadyText="Ready" LoadingText="Loading..." />
                            <MasterTableView AutoGenerateColumns="false" EditMode="InPlace" AllowFilteringByColumn="True"
                                ShowFooter="True" TableLayout="Auto">
                                <Columns>
 
                                    <telerik:GridBoundColumn HeaderStyle-Width="150px" HeaderText="First Name" UniqueName="FirstName" DataField="FirstName" SortExpression="FirstName" >
                                    </telerik:GridBoundColumn>
 
                                    <telerik:GridBoundColumn HeaderStyle-Width="150px" UniqueName="LastName" HeaderText="Last Name" DataField="LastName" SortExpression="LastName" >
                                    </telerik:GridBoundColumn>
 
                                    <telerik:GridBoundColumn HeaderStyle-Width="350px" UniqueName="VoterAddress" HeaderText="Address" DataField="Address" SortExpression="Address"  >
                                    </telerik:GridBoundColumn >
 
                                    <telerik:GridButtonColumn CommandName="RemoveSigner" HeaderStyle-Width="135px" UniqueName="RemoveSigner" HeaderText="Remove" ButtonType="PushButton" Text="Remove" ConfirmText="Are you certain that you want to remove this signature?" >
                                    </telerik:GridButtonColumn>
 
                                </Columns>
                            </MasterTableView>
                            <ClientSettings>
                                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                            </ClientSettings>
                        </telerik:RadGrid>
                    </td>
                    <td width="2%">
                          
                    </td>
                </tr>
 
                <tr>
                    <td colspan="5" align="center" >
                        <asp:Label ID="Label17" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
 
                <tr>
                    <td colspan="5" align="center" >
                        <asp:Label ID="SignatureCountMessage" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
 
                <tr>
                    <td colspan="5" align="center" >
                        <asp:Label ID="Label18" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td colspan="5" align="center" >
                          
                    </td>
                </tr>
                <tr >
                    <td>
                          
                    </td>
                        <td align="center" valign="middle" colspan="3" >
                            <asp:Label CssClass="VerticalAlign1" ID="Label14" Font-Size="16px" Width="100%" BackColor="#565A43" Height="24px" ForeColor="#ffffff" Font-Bold="true" runat="server" Text="<%$ Resources:Resource, CloseAndPrintLabel %>"></asp:Label>
                        </td>
                    <td>
                          
                    </td>
                </tr>
                <tr>
                    <td colspan="5" align="center" >
                          
                    </td>
                </tr>
                <tr>
                    <td colspan="5" align="center" >
                        <asp:Button ID="ReturnToMyDocs" runat="server" TabIndex="6"
                            Text="<%$ Resources:Resource, ReturnToMyEDocs %>"
                            onclick="ReturnToMyDocs_Click" />
                            
                        <asp:Button ID="ClosePetitionButton" TabIndex="7" runat="server" Text="<%$ Resources:Resource, ClosePetitionBtn %>" />
                            
                        <asp:Button ID="PrintListButton" TabIndex="8" runat="server" Text="<%$ Resources:Resource, PrintListBtn %>" />
                            
                        <asp:Button ID="PrintForFilingButton" TabIndex="9" runat="server" Text="<%$ Resources:Resource, PrintForFilingBtn %>" />
                    </td>
                </tr>
                <tr>
                    <td colspan="5" align="center" >
                          
                    </td>
                </tr>
            </table>
        </div>
        <div class="clear">
        </div>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:ElectronicPetitionSystemConnectionString %>"
        ProviderName="System.Data.SqlClient" runat="server">
    </asp:SqlDataSource>
</asp:Content>


And now the code behind:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
 
public partial class PetitionInfo : System.Web.UI.Page
{
    protected void Page_Init(object sender, EventArgs e)
    {
            //  Set the sql statement for the sql data source
            string griddatasource = "SELECT VoterSignatureId, PetitionId, LastName, FirstName, MiddleName, NameSuffix, [Address], CountyId, Email, SignatureImage, CountyVoterId, ";
            griddatasource = griddatasource + "MvdSerialNumber, DateSigned, ClientIpAddress, VoterSignatureStatusId, CreatedDate, ModifiedDate ";
            griddatasource = griddatasource + "FROM VoterSignatures ";
            string gridWHERE = "WHERE PetitionId = " + Request.QueryString["PID"];
            SqlDataSource1.SelectCommand = griddatasource + gridWHERE;
    }
 
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
 
            if (Request.QueryString["PID"].Length > 0)
            {
                Int32 iMyKeyValue = Convert.ToInt32(Request.QueryString["PID"]);
                ElectronicPetitionSystemDataContext efdc = new ElectronicPetitionSystemDataContext();
 
                var petn =
                    (from pe in efdc.Misc_GetPetitionInfo(iMyKeyValue)
                     select pe).First();
                //  First display the individual fields at the top of the screen
                this.ElectionCycleList.Text = petn.CycleName;
                this.PoliticalRaceList.Text = petn.OfficeDescription;
                this.CandidateName.Text = petn.CandidateDisplayName;
                this.CandidateAddress.Text = petn.Address1;
                this.CandidateCity.Text = petn.City;
                this.CandidateState.Text = petn.State;
                this.CandidateZipCode.Text = petn.Zip;
                this.CandidateCountyList.Text = petn.CountyName;
                this.ContactName.Text = petn.ContactDisplayName;
                this.ContactPhone.Text = petn.ContactPhone;
                this.ContactEmailAddress.Text = petn.ContactEmail;
                this.ContactWebSiteURL.Text = petn.ContactLink;
                this.LinkToURL.Text = Convert.ToString(petn.DeepLinkGuid);
 
            }
        }
                SignatureCountMessage.Text = "(" + (String)GetGlobalResourceObject("Resource", "YouCurrentlyHave1") + " nn " + (String)GetGlobalResourceObject("Resource", "YouCurrentlyHave2") + " nnnn " + (String)GetGlobalResourceObject("Resource", "YouCurrentlyHave3") + ")";
    }
 
    //  Telerik grid sample with filtering, etc.
    //
    //
    //  The following link may be a better example for the SQL/filtering handling
 
    protected void ReturnToMyDocs_Click(object sender, EventArgs e)
    {
        Response.Redirect("MyeDocs.aspx");
    }
}

7 Answers, 1 is accepted

Sort by
0
Antonio Stoilkov
Telerik team
answered on 24 Nov 2011, 01:05 PM
Hi Lynn,

The behavior that you currently experience is expected. Showing AJAX Loading Panel on initial page load is not supported out of the box, however it is easy to achieve using some additional code. Below I have pasted the link to the Show AJAX Loading Panel on initial page load help article explaining how this type of functionality can be implemented.

Hope this information will prove helpful.

Greetings,
Antonio Stoilkov
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
Lynn
Top achievements
Rank 2
answered on 25 Nov 2011, 04:05 PM
Antonio,

I tried to use the suggestion in the link you provided, but receive an error each time I run the page.  The attached graphic is a screen capture of the error received.

The code from the .aspx page is below:

<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/EPSDev3.master" AutoEventWireup="true" CodeFile="PetitionInfo.aspx.cs" Inherits="PetitionInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
    .VerticalAlign1 
    
        padding-top: 6px;
    }
        .style1
        {
            height: 31px;
        }
        .RadGrid_Default .rgHeaderDiv
        {
            width: 785px !important;
        }
 
        .RadGrid_Default .rgFooterDiv
        {
            width: 785px !important;
        }
</style>
    <script type="text/javascript">
        window.onload = function () {
            setTimeout(function () {
                window["<%= RadAjaxManager1.ClientID %>"].AjaxRequest("InitialPageLoad");
            }, 200);
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
      <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        <!-- content start -->
 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="SignersGrid">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="SignersGrid" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
 
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" AlternateText="Loading..." Skin="Black" runat="server"  />
    <div style="width: 800px;">
        <div style="float: left; background-color: White; padding: 0px;">
            <table cellpadding="1" cellspacing="0" border="0" >
                <tr>
                    <td colspan="5" align="center" >
                        <h2>
                            <asp:Label ID="VoterAuthenticationLabel" runat="server" Text="<%$ Resources:Resource, PetitionInformationLabel %>"></asp:Label>
                        </h2>
                    </td>
                </tr>
                <tr>
                    <td width="2%">
                          
                    </td>
                    <td width="47%" valign="top">
                        <table >
                            <tr>
                                <td colspan="2" align="left" style="font-weight: normal; height: 12px;">
                                    <asp:Label ID="Label6" runat="server" Font-Bold="true" Text="<%$ Resources:Resource, CandidateInformationLabel%>"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="CycleLabel" runat="server" Text="<%$ Resources:Resource, CycleLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="ElectionCycleList" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label1" runat="server" Text="<%$ Resources:Resource, RaceLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="PoliticalRaceList" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label2" runat="server" Text="<%$ Resources:Resource, NameLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="CandidateName" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label3" runat="server" Text="<%$ Resources:Resource, AddressLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="CandidateAddress" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label4" runat="server" Text="<%$ Resources:Resource, CityStZipLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="CandidateCity" runat="server" Text=""></asp:Label>
                                       
                                    <asp:Label ID="CandidateState" runat="server" Text=""></asp:Label>
                                       
                                    <asp:Label ID="CandidateZipCode" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label5" runat="server" Text="<%$ Resources:Resource, CountyLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="CandidateCountyList" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="2%">
                          
                    </td>
                    <td width="47%"  valign="top">
                        <table width="100%">
                            <tr>
                                <td colspan="2" align="left" style="font-weight: normal; height: 12px;">
                                    <asp:Label ID="Label7" runat="server" Font-Bold="true" Text="<%$ Resources:Resource, ContactInformationLabel%>"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label8" runat="server" Text="<%$ Resources:Resource, NameLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="ContactName" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label9" runat="server" Text="<%$ Resources:Resource, PhoneLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="ContactPhone" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label10" runat="server" Text="<%$ Resources:Resource, EmailLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="ContactEmailAddress" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label11" runat="server" Text="<%$ Resources:Resource, WebSiteLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="ContactWebSiteURL" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label16" runat="server" Text="<%$ Resources:Resource, LinkToLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="LinkToURL" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="2%">
                          
                    </td>
                </tr>
                <tr>
                    <td colspan="5">
                          
                    </td>
                </tr>
                <tr >
                    <td>
                          
                    </td>
                        <td align="center" valign="middle" colspan="3" >
                            <asp:Label CssClass="VerticalAlign1" ID="PetitionsListTitle" Font-Size="16px" Width="100%" BackColor="#565A43" Height="24px" ForeColor="#ffffff" Font-Bold="true" runat="server" Text="<%$ Resources:Resource, PetitionSignersLabel %>"></asp:Label>
                        </td>
                    <td>
                          
                    </td>
                </tr>
                <tr>
                    <td width="2%">
                          
                    </td>
                    <td colspan="3" valign="middle">
                        <telerik:RadGrid AutoGenerateColumns="false" ID="SignersGrid" runat="server" Width="785px"
                            AllowSorting="true" AllowFilteringByColumn="true" EnableLinqExpressions="true"
                            AllowPaging="false" PageSize="15" CommandItemDisplay="Bottom"
                            BorderWidth="1px" BorderColor="#999999" EnableEmbeddedSkins="true" Skin="Default"
                            DataSourceID="SQLDataSource1"
                            ShowStatusBar="true"
                            ShowFooter="false" GridLines="None" >
                            <PagerStyle Mode="NextPrevAndNumeric" />
                            <GroupingSettings CaseSensitive="false" />
                            <StatusBarSettings ReadyText="Ready" LoadingText="Loading..." />
                            <MasterTableView AutoGenerateColumns="false" EditMode="InPlace" AllowFilteringByColumn="True"
                                ShowFooter="True" TableLayout="Auto">
                                <Columns>
 
                                    <telerik:GridBoundColumn HeaderStyle-Width="150px" HeaderText="First Name" UniqueName="FirstName" DataField="FirstName" SortExpression="FirstName" >
                                    </telerik:GridBoundColumn>
 
                                    <telerik:GridBoundColumn HeaderStyle-Width="150px" UniqueName="LastName" HeaderText="Last Name" DataField="LastName" SortExpression="LastName" >
                                    </telerik:GridBoundColumn>
 
                                    <telerik:GridBoundColumn HeaderStyle-Width="350px" UniqueName="VoterAddress" HeaderText="Address" DataField="Address" SortExpression="Address"  >
                                    </telerik:GridBoundColumn >
 
                                    <telerik:GridButtonColumn CommandName="RemoveSigner" HeaderStyle-Width="135px" UniqueName="RemoveSigner" HeaderText="Remove" ButtonType="PushButton" Text="Remove" ConfirmText="Are you certain that you want to remove this signature?" >
                                    </telerik:GridButtonColumn>
 
                                </Columns>
                            </MasterTableView>
                            <ClientSettings>
                                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                            </ClientSettings>
                        </telerik:RadGrid>
                    </td>
                    <td width="2%">
                          
                    </td>
                </tr>
 
                <tr>
                    <td colspan="5" align="center" >
                        <asp:Label ID="Label17" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
 
                <tr>
                    <td colspan="5" align="center" >
                        <asp:Label ID="SignatureCountMessage" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
 
                <tr>
                    <td colspan="5" align="center" >
                        <asp:Label ID="Label18" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td colspan="5" align="center" >
                          
                    </td>
                </tr>
                <tr >
                    <td>
                          
                    </td>
                        <td align="center" valign="middle" colspan="3" >
                            <asp:Label CssClass="VerticalAlign1" ID="Label14" Font-Size="16px" Width="100%" BackColor="#565A43" Height="24px" ForeColor="#ffffff" Font-Bold="true" runat="server" Text="<%$ Resources:Resource, CloseAndPrintLabel %>"></asp:Label>
                        </td>
                    <td>
                          
                    </td>
                </tr>
                <tr>
                    <td colspan="5" align="center" >
                          
                    </td>
                </tr>
                <tr>
                    <td colspan="5" align="center" >
                        <asp:Button ID="ReturnToMyDocs" runat="server" TabIndex="6"
                            Text="<%$ Resources:Resource, ReturnToMyEDocs %>"
                            onclick="ReturnToMyDocs_Click" />
                            
                        <asp:Button ID="ClosePetitionButton" TabIndex="7" runat="server" Text="<%$ Resources:Resource, ClosePetitionBtn %>" />
                            
                        <asp:Button ID="PrintListButton" TabIndex="8" runat="server" Text="<%$ Resources:Resource, PrintListBtn %>" />
                            
                        <asp:Button ID="PrintForFilingButton" TabIndex="9" runat="server" Text="<%$ Resources:Resource, PrintForFilingBtn %>" />
                    </td>
                </tr>
                <tr>
                    <td colspan="5" align="center" >
                          
                    </td>
                </tr>
            </table>
        </div>
        <div class="clear">
        </div>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:ElectronicPetitionSystemConnectionString %>"
        ProviderName="System.Data.SqlClient" runat="server">
    </asp:SqlDataSource>
</asp:Content>

Thanks!

Lynn
0
Antonio Stoilkov
Telerik team
answered on 25 Nov 2011, 05:24 PM
Hello Lynn,

To achieve your goal you should change the JavaScript code to the following:

<telerik:RadCodeBlock runat="server">
    <script type="text/javascript">
        window.onload = function () {
            setTimeout(function () {
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("InitialPageLoad");
            }, 200);
        }
    </script>
</telerik:RadCodeBlock>

Sorry for the inconvenience, I have sent you an outdated documentation.

All the best,
Antonio Stoilkov
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
Lynn
Top achievements
Rank 2
answered on 25 Nov 2011, 05:40 PM
Antonio,

Thanks for this correction. There is no longer an error being encountered, the page loads without the error.  However, the "loading..." graphic is still not visible until the user submits a filter or column sort.

Sorry to be such a pain here!

Lynn
0
Accepted
Antonio Stoilkov
Telerik team
answered on 28 Nov 2011, 04:10 PM
Hi Lynn,

I have assembled a sample project demonstrating the desired functionality. You could go through the Show RadAjaxLoadingPanel on Initial Page Load section in the help article below:
The article is with updated information.

Additionally, you could follow the steps below to achieve your scenario:
  • Use the code below for the RadAjaxManager
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="Panel1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
  • Subscribe to RadAjaxManager AjaxRequest event and paste the C# in the code behind. The System.Threading.Thread.Sleep(4000); is only for demonstrating purposes and should be removed.
protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
{
    if (e.Argument == "InitialPageLoad")
    {
        //simulate longer page load
        System.Threading.Thread.Sleep(4000); //this line should be removed
        Panel2.Visible = true;
    }
}
  • Place your page content in Panel2
<asp:Panel ID="Panel1" runat="server">
    <asp:Panel ID="Panel2" Visible="false" runat="server">
        My content:
    </asp:Panel>
</asp:Panel>
  • Use the code below for the RadAjaxLoadingPanel
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" alternatetext="Loading..." Skin="Black" runat="server" IsSticky="true" Style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" />
  • Paste the following JavaScript
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function pageLoad(sender, eventArgs) {
            if (!eventArgs.get_isPartialLoad()) {
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("InitialPageLoad");
            }
        }
    </script>
</telerik:RadCodeBlock>

Best wishes,
Antonio Stoilkov
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
Lynn
Top achievements
Rank 2
answered on 28 Nov 2011, 07:22 PM
Antonio,

I'm going to have to drop this item for now.  I've got some other things I need to get out the door.  I've spent about 4 hours on this one item and I can't really do that right now.

I used your project and it worked fine by itself.

Then I literally copied your code into my existing page and tried it.  The page displayed just fine, but the "loading panel" never displayed at Page Load -- and the RadAjaxManager1_AjaxRequest event DID fire.

I just have to quit on this for now.  It's taking way too much of my time.

Thanks for your continued support!  I'm not giving up permanently, but...

Lynn

0
Lynn
Top achievements
Rank 2
answered on 30 Nov 2011, 04:20 AM
Antonio,

Your suggestion did resolve my problem.  However, for the sake of anyone else out there who may read this...
In the suggested solution, there is code for the .aspx (display portion) file.  At one point, there is a comment that says "Your content here" (or something similar).  At this point, the only manner in which I was able to make this work was if the only item that I placed in this area was the rad grid. 

The page I was using this approach on contained other controls (textboxes, combo boxes, etc.).  When I originally read this, I thought that meant to "put ALL of your content here".  It doesn't...  Put your grid in this area and make certain that any/all other controls are placed outside (above or below) the panels.

Antonio, thank you for the assistance.  The grid is working great!  As usual, if you listen and think your way through these controls, they can do wonderful things!

Lynn
Tags
Grid
Asked by
Lynn
Top achievements
Rank 2
Answers by
Antonio Stoilkov
Telerik team
Lynn
Top achievements
Rank 2
Share this question
or