Incorrect Paging with Filtering

2 posts, 0 answers
  1. Rodney
    Rodney avatar
    54 posts
    Member since:
    Mar 2015

    Posted 08 Aug 2016 Link to this post

    I'm getting very odd paging when I apply filters to certain grids, while others seem to be working correctly with basically the same code. What happens if I have my row result set to 25 and have 2 pages of results then I filter which only returns 5 results, the pager still shows two pages and the count still says page 1 of 2 and rows 1-25 of 26. I've attached some screen shots so you can see exactly what I'm referring to. What's worse is if you click on the pager to go to the next page it's blank and the pager control disappears. 

    Here's the basic header stuff for the Grid, if you need more let me know:

    <telerik:RadGrid ID="rgActionItems"
        ClientSettings-AllowColumnsReorder="false" ClientSettings-Resizing-AllowColumnResize="false" ClientSettings-Scrolling-UseStaticHeaders="true"
        ExportSettings-ExportOnlyData="true" ExportSettings-IgnorePaging="true" ExportSettings-OpenInNewWindow="true" ExportSettings-HideStructureColumns="true"
        GroupingSettings-CaseSensitive="false" MasterTableView-AllowMultiColumnSorting="false" MasterTableView-AllowNaturalSort="false" AllowFilteringByColumn="true" MasterTableView-CommandItemDisplay="Top"
        MasterTableView-CommandItemSettings-ShowExportToExcelButton="true" ExportSettings-Excel-Format="Xlsx"
        MasterTableView-CommandItemSettings-ShowExportToPdfButton="true" ExportSettings-Pdf-AllowCopy="true" ExportSettings-Pdf-AllowPrinting="true" ExportSettings-Pdf-AllowModify="true"
        MasterTableView-CommandItemSettings-ShowExportToWordButton="true" ExportSettings-Word-Format="Docx"
        PagerStyle-AlwaysVisible="true" PagerStyle-EnableAllOptionInPagerComboBox="true"
        MasterTableView-PagerStyle-PagerTextFormat="{4} Page {0} of {1}, rows {2} to {3} of {5}"
                <telerik:GridSortExpression FieldName="" SortOrder="Ascending" />
                <asp:Label ID="Label1" Text="No Records Found" runat="server" />






  2. Eyup
    Eyup avatar
    4046 posts

    Posted 11 Aug 2016 Link to this post

    Hi Rodney,

    Please make sure that you are not using the DataBind() method to bind the grid. Performing complex grid operations such as Inserting, Deleting, Updating, Hierarchy relations, Grouping, Exporting, Paging, Sorting, Filtering, etc. require accommodating appropriate database operations.  Therefore, we suggest you to avoid Simple Databinding and strongly recommend the use of more advanced databinding methods, which automatically handle the aforementioned functions:

    Declarative DataSource (DataSourceID property)
    Programmatic Data Binding (NeedDataSource event, + DetailTableDataBind for hierarchy). You should set the DataSource property ONLY within these event handler.

    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top