Hello, I'm having a problem where the DataPager won't work if my RadListView has more than approximate 1,800 records. Everything is fine with small record counts returned in sql. Is something wrong with my Panels or AjaxManager? Please advise.
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="ListViewPanel1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
<telerik:AjaxUpdatedControl ControlID="RadDataPager1" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RadDataPager1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelHeight="100%" />
</UpdatedControls>
</telerik:AjaxSetting>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="30"></telerik:RadAjaxLoadingPanel>
<div class="demo-container position-relative" style="height: 65%;"
<div id="demo" class="demo-container no-bg page-wrapper position-relative scroll_vertical height-55percent">
<asp:Panel ID="ListViewPanel1" runat="server" Width="100%" Height="50%" CssClass="position-relative height-100percent">
<telerik:RadListView
ID="RadListView1"
runat="server"
RenderMode="Lightweight"
ItemPlaceholderID="ProductsHolder"
OnItemDataBound="RadListView1_ItemDataBound"
DataKeyNames="ENTITY_ID,CLAIM_TRANSACTION_SUMMARY_ID,ACTIVITY_NOTES,AGE,COLLECTION_DAYS,LAST_ACTIVITY_DATE,INACTIVE_DATE,FORM_TYPE,FLCOLOR,INCOLOR"
AllowPaging="true"
AllowCustomPaging="true"
CssClass="position-relative height-100percent"
OnItemCommand="RadListView1_ItemCommand" Width="100%" Height="100%">
<LayoutTemplate>
<div class="RadListView position-relative height-100percent" style="height: 100%;">
<asp:Panel ID="ProductsHolder" runat="server" />
</div>
</LayoutTemplate>
<ItemTemplate>.....
</ItemTemplate>
<EmptyDataTemplate>
<fieldset class="noRecordsFieldset">
No records for available.
</fieldset>
</EmptyDataTemplate>
</telerik:RadListView>
</asp:Panel>
</div>
<!-- Pagination -->
<div class="claims-pagination">
<fieldset style="border-width: 1px; border-color: #E6E6E6;">
<div>
<telerik:RadDataPager RenderMode="Lightweight" ID="RadDataPager1" runat="server" PagedControlID="RadListView1" PageSize="50">
<Fields>
<telerik:RadDataPagerButtonField FieldType="FirstPrev" />
<telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="5" />
<telerik:RadDataPagerButtonField FieldType="NextLast" />
<telerik:RadDataPagerPageSizeField PageSizeComboWidth="60" PageSizeText="Page size: " />
<telerik:RadDataPagerGoToPageField CurrentPageText="Page: " TotalPageText="of" SubmitButtonText="Go" />
<telerik:RadDataPagerTemplatePageField>
<PagerTemplate>
<div class="pager">
<b>Items<asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex + 1%>" />
to
<asp:Label runat="server" ID="TotalPagesLabel" Text="<%# If(Container.Owner.TotalRowCount > (Container.Owner.StartRowIndex + Container.Owner.PageSize), Container.Owner.StartRowIndex + Container.Owner.PageSize, Container.Owner.TotalRowCount) %>" />
of
<asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
<br />
</b>
</div>
</PagerTemplate>
</telerik:RadDataPagerTemplatePageField>
</Fields>
</telerik:RadDataPager>
</div>
</fieldset>
</div>
Code behind:
Protected Sub RadListView1_NeedDataSource(source As Object, e As Telerik.Web.UI.RadListViewNeedDataSourceEventArgs) Handles RadListView1.NeedDataSource
Try
iMinRows = (RadListView1.CurrentPageIndex * RadListView1.PageSize)
iMaxRows = ((RadListView1.CurrentPageIndex + 1) * RadListView1.PageSize)
If Not IsNothing(dtClaims) Then
dtClaims.Clear()
End If
dtClaims = ucFilters.GetDataTablePage(iMinRows, iMaxRows)
RadListView1.DataSource = dtClaims
RadListView1.VirtualItemCount = ucFilters.RowCount
Catch ex As Exception
Throw ex
End Try
End Sub