or

I am using the scrolling functionality of the grid in order to load more records if the user scrolls to the bottom of the page.I have taken the examples from the site and changed the data source. Now when I scroll to the end the grid does not show the additional records. In the code behind AjaxRequest I can see that the page size is increasing every time i reach the bottom of the page but no loader image shows up and the grid does not show the additional records.
Here is the code
Thank you
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e){ RadGrid1.PageSize = 15 + RadGrid1.PageSize; RadGrid1.Rebind();}<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication2._Default" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"></asp:Content><asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> function HandleScrolling(e) { var grid = $find("<%=RadGrid1.ClientID %>"); var scrollArea = document.getElementById("<%= RadGrid1.ClientID %>" + "_GridData"); if (IsScrolledToBottom(scrollArea)) { var currentlyDisplayedRecords = grid.get_masterTableView().get_pageSize() * (grid.get_masterTableView().get_currentPageIndex() + 1); //if the visible items are less than the entire record count //trigger an ajax request to increase them if (currentlyDisplayedRecords < 100) { $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("LoadMoreRecords"); } } } //calculate when the scroll bar is at the bottom function IsScrolledToBottom(scrollArea) { var currentPosition = scrollArea.scrollTop + scrollArea.clientHeight; return currentPosition == scrollArea.scrollHeight; } </script> </telerik:RadCodeBlock> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" Width="75px" Transparency="25"> <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border: 0;" /> </telerik:RadAjaxLoadingPanel> <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" AllowSorting="True" AllowPaging="True" PageSize="15" Width="97%" GridLines="None"> <PagerStyle Visible="False" /> <MasterTableView Width="99%" TableLayout="Fixed" CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst" DataSourceID="SqlDataSource1" PageSize="15"> </MasterTableView> <ClientSettings> <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="100px" /> <ClientEvents OnScroll="HandleScrolling" /> </ClientSettings> </telerik:RadGrid><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnection %>" SelectCommand="SELECT DisplayName FROM SP_Messages"></asp:SqlDataSource></asp:Content><telerik:RadGrid ID="RadGrid1" runat="server" Width="700px" AllowSorting="true" AllowPaging="true"
pagesize= "10" AutoGenerateColumns="false" OnItemCreated="g_ItemCreated">
<MasterTableView AllowNaturalSort="true" DataKeyNames="parm_id" AllowAutomaticUpdates="false" EditMode="InPlace" >
<Columns>
<telerik:GridBoundColumn DataField="id" UniqueName="ID" HeaderText="ID"
ItemStyle-Width="200px" AllowSorting="true" ShowSortIcon="true" SortExpression="ID asc" ReadOnly="true" Display = "false"/>
<telerik:GridBoundColumn DataField="name" UniqueName="Name" HeaderText="Name"
ItemStyle-Width="200px" AllowSorting="true" ShowSortIcon="true" SortExpression="Name asc" ReadOnly="true" />
<telerik:GridNumericColumn
DataField="Score"
DataType="System.Int32"
HeaderText="Score"
UniqueName="Score"
>
</telerik:GridNumericColumn>
<telerik:GridCheckBoxColumn UniqueName="ActiveFlag" HeaderText="Is Active" DataField = "active_flag" />
<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" HeaderText="">
</telerik:GridEditCommandColumn>
</Columns>
</MasterTableView>
<ClientSettings >
<ClientEvents OnDataBinding="OnDataBinding" OnRowDataBound="OnRowDataBound" />
<DataBinding Location="WcfDataService1.svc" >
<DataService TableName="Student" />
</DataBinding>
</ClientSettings>
</telerik:RadGrid>
Someone could help me? Thanks in advance.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RMAGenerator.aspx.cs" Inherits="ECSMT.RMAGenerator" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>JDE RMA Grid Creation</title> <script src="/Scripts/modernizr-2.0.6.min.js" type="text/javascript"> </script> <style> section { background: #cfdbe6; margin: 20px; padding: 5px; border-radius: 10px; box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5); background: cfdbe6; width: 95%; color: #696969; font-size: 12px; } section h1 {font-size: 16px; font-weight: bold; color:Navy } section h2 {font-size: 12px; font-weight: bold; text-decoration: underline} .MyImageButton { cursor: hand; } .EditFormHeader td { font-size: 14px; padding: 4px !important; color: #0066cc; } </style></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="rgrdRMA"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="rgrdRMA" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="rbtnAppend"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="rbtnAppend"></telerik:AjaxUpdatedControl> <telerik:AjaxUpdatedControl ControlID="rgrdRMA" LoadingPanelID="RadAjaxLoadingPanel1" ></telerik:AjaxUpdatedControl> </UpdatedControls> </telerik:AjaxSetting><%-- <telerik:AjaxSetting AjaxControlID="rbtnExport"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="rbtnExport"></telerik:AjaxUpdatedControl> <telerik:AjaxUpdatedControl ControlID="rgrdExpXl" LoadingPanelID="RadAjaxLoadingPanel1" ></telerik:AjaxUpdatedControl> </UpdatedControls> </telerik:AjaxSetting>--%> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" Width = "100%" Height="100%"> </telerik:RadAjaxLoadingPanel> <h3>RMA Generator</h3> <h1>CEI:<asp:Label ID="lblCEI" runat="server" Text="0"></asp:Label> CMT:<asp:Label ID="lblCMT" runat="server" Text="0"></asp:Label></h1> <h3><asp:Label ID = "lblCustInfo" runat="server" Text="Customer Information" ></asp:Label></h3> <telerik:RadGrid ID="rgrdRMA" runat="server" GridLines="Both" Skin="Windows7" AllowPaging="False" AllowSorting="false" AutoGenerateColumns="False" OnNeedDataSource="rgrdRMA_NeedDataSource" OnUpdateCommand="rgrdRMA_UpdateCommand" OnInsertCommand="rgrdRMA_InsertCommand" OnDeleteCommand="rgrdRMA_DeleteCommand" ShowStatusBar="true"> <MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="RowNumber" AutoGenerateColumns="False" EditMode="InPlace" > <Columns> <telerik:GridEditCommandColumn UniqueName="EditCommandColumn"> </telerik:GridEditCommandColumn> <telerik:GridDropDownColumn DataField="LastDispo" DataSourceID="SqlDataSource1" HeaderText="LastDispo" ListTextField="DescOne" ListValueField="LastDispo" UniqueName="LastDispo" > </telerik:GridDropDownColumn> <telerik:GridDropDownColumn DataField="LITM" DataSourceID="SqlDataSource2" HeaderText="LITM" ListTextField="DSC" ListValueField="LITM" UniqueName="LITM" > </telerik:GridDropDownColumn> <telerik:GridNumericColumn UniqueName="ReturnQty" SortExpression="ReturnQty" HeaderText="ReturnQty" DataField="ReturnQty" /> <telerik:GridDropDownColumn DataField="ReturnEquipNum" DataSourceID="EquipmentForReceipt" HeaderText="ReturnEquipNum" ListTextField="BigDescrip" ListValueField="ReturnEquipNum" UniqueName="ReturnEquipNum" > </telerik:GridDropDownColumn> <telerik:GridBoundColumn UniqueName="ReturnSerialNum" SortExpression="ReturnSerialNum" HeaderText="ReturnSerialNum" DataField="ReturnSerialNum" ReadOnly="true" /> <telerik:GridBoundColumn UniqueName="IncomingLocCode" SortExpression="IncomingLocCode" HeaderText="IncomingLocCode" DataField="IncomingLocCode" /> <telerik:GridDropDownColumn DataField="ShipToAddr" DataSourceID="ShipTosFilteredByCMT" HeaderText="ShipToAddr" ListTextField="ShipToAddr" ListValueField="ShipToAddr" UniqueName="ShipToAddr" > </telerik:GridDropDownColumn> <telerik:GridNumericColumn UniqueName="ReplacementQty" SortExpression="ReplacementQty" HeaderText="ReplacementQty" DataField="ReplacementQty" /> <telerik:GridNumericColumn UniqueName="ReplacementEquipID" SortExpression="ReplacementEquipID" HeaderText="ReplacementEquipID" DataField="ReplacementEquipID" /> <telerik:GridBoundColumn UniqueName="OutgoingLocCode" SortExpression="OutgoingLocCode" HeaderText="OutgoingLocCode" DataField="OutgoingLocCode" /> <telerik:GridBoundColumn UniqueName="RequestedShipDate" SortExpression="RequestedShipDate" HeaderText="RequestedShipDate" DataField="RequestedShipDate" ReadOnly="true"/> <telerik:GridButtonColumn UniqueName="DeleteColumn" CommandName="Delete" ButtonType="LinkButton" Text="Delete" /> </Columns> </MasterTableView> </telerik:RadGrid> <asp:Table ID="tblControls" runat="server" Width="100%"> <asp:TableRow Width = "100%"> <asp:TableCell Width="20%" HorizontalAlign="Right" > <h1>Append RMA Product For</h1> </asp:TableCell> <asp:TableCell Width="30%" HorizontalAlign="Right" > <telerik:RadComboBox ID="rcmbProduct" Runat="server" Width="100%" AutoPostBack="true" ></telerik:RadComboBox> </asp:TableCell> <asp:TableCell Width="10%" HorizontalAlign="Left" > <telerik:RadButton ID="rbtnAppend" runat="server" Text="Append" OnClick="rbtnAppend_Click" AutoPostBack="true"></telerik:RadButton> </asp:TableCell> <asp:TableCell Width="40%" HorizontalAlign ="Justify"> <telerik:RadButton ID="rbtnExport" runat="server" Text="Export" OnClick="rbtnExport_Click" AutoPostBack="true"></telerik:RadButton> </asp:TableCell> </asp:TableRow> <asp:TableRow > <asp:TableCell Width="20%" HorizontalAlign="Center" > <asp:Label ID="lblCurPC" Text="Current PC:" runat="server"></asp:Label> </asp:TableCell> <asp:TableCell Width="20%" HorizontalAlign="Center" > <asp:Label ID="lblCurPCType" Text="Current PC Type:" runat="server"></asp:Label> </asp:TableCell> <asp:TableCell Width="20%" HorizontalAlign="Center" > <asp:Label ID="lblCurScreenSKU" Text="Current Screen SKU :" runat="server"></asp:Label> </asp:TableCell> <asp:TableCell Width="40%" HorizontalAlign ="Center"> </asp:TableCell> </asp:TableRow> </asp:Table> <telerik:RadGrid ID="rgrdExpXl" runat="server" GridLines="Both" Skin="Windows7" AllowPaging="False" AutoGenerateColumns="False" OnNeedDataSource="rgrdExpXl_NeedDataSource" > <MasterTableView Width="100%" AutoGenerateColumns="False" > <Columns> <telerik:GridBoundColumn DataField="LastDispo" HeaderText="" UniqueName="LastDispo" /> <telerik:GridBoundColumn DataField="LITM" HeaderText="" UniqueName="LITM" /> <telerik:GridNumericColumn UniqueName="ReturnQty" HeaderText="" DataField="ReturnQty" /> <telerik:GridBoundColumn DataField="ReturnEquipNum" HeaderText="" UniqueName="ReturnEquipNum" /> <telerik:GridBoundColumn UniqueName="ReturnSerialNum" HeaderText="" DataField="ReturnSerialNum" /> <telerik:GridBoundColumn UniqueName="RequestedShipDate" HeaderText="" DataField="RequestedShipDate" /> <telerik:GridBoundColumn DataField="LITM" HeaderText="" UniqueName="LITM2" /> <telerik:GridBoundColumn DataField="ShipToAddr" HeaderText="" UniqueName="ShipToAddr" /> <telerik:GridNumericColumn UniqueName="ReplacementEquipID" HeaderText="" DataField="ReplacementEquipID" /> <telerik:GridNumericColumn UniqueName="ReplacementQty" HeaderText="" DataField="ReplacementQty" /> <telerik:GridNumericColumn UniqueName="ReturnQty2" HeaderText="" DataField="ReturnQty" /> <telerik:GridNumericColumn UniqueName="LineNumber" HeaderText="" DataField="LineNumber" /> <telerik:GridBoundColumn UniqueName="IncomingLocCode" HeaderText="" DataField="IncomingLocCode" /> <telerik:GridBoundColumn UniqueName="OutgoingLocCode" HeaderText="" DataField="OutgoingLocCode" /> </Columns> </MasterTableView> </telerik:RadGrid> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:JDECommon %>" ProviderName="System.Data.SqlClient" SelectCommand="uspGetLastDispoForRMAGrid"> </asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:JDECommon %>" ProviderName="System.Data.SqlClient" SelectCommand="uspGetRMASKUS"> </asp:SqlDataSource> <asp:SqlDataSource ID="ShipTosFilteredByCMT" runat="server" ConnectionString="<%$ ConnectionStrings:JDECommon %>" SelectCommand= "uspGetRMAShipTos @CMT"> <SelectParameters> <asp:ControlParameter ControlID="lblCMT" Name="CMT" PropertyName="Text" /> </SelectParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="EquipmentForReceipt" runat="server" ConnectionString="<%$ ConnectionStrings:JDECommon %>" SelectCommand= "uspGetRMAOutboundEquipmentForCEI @CEI "> <SelectParameters> <asp:ControlParameter ControlID="lblCEI" Name="CEI" PropertyName="Text" /> </SelectParameters> </asp:SqlDataSource> </form></body><script type="text/javascript"> Modernizr.load([{ complete: function () { if (!window.jQuery) { Modernizr.load('/Scripts/jquery-1.6.1.min.js'); } } }, { test: Modernizr.borderradius || Modernizr.boxshadow, nope: '/Scripts/PIE.js', callback: function () { $('section').each(function () { PIE.attach(this); }); } }]); </script></html>