locked
Telerik Grid paging issue RRS feed

  • Question

  • User1928617998 posted

    I am using the Telerik RAD grid to display data with paging. As shown in the demo below, I am trying to implement both numeric and Next/Previous buttons pager.
    http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/paging/defaultcs.aspx

    However, I am facing the following issue:

    If my datasource has 55 records and the page size is 20 (default). I get 3 pages and clicking on 1, 2 and 3 (page numbers) loads the correct records on the respective pages.

    However, if I change the page size to say 10. I see 6 pages and the data on the first page (10 records) is fine, but as soon as I change the page number (by clicking on the numbers) to go to the next page (say 2), the page size is reset to 20 and I am back to seeing 3 pages.

    What am I missing?
    Here is a brief snippet from the .aspx page:

    <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"
        EnableViewState="true" AutoGenerateColumns="False" PageSize="20"
        OnItemDataBound="RadGrid1_ItemDataBound" OnNeedDataSource="RadGrid1_NeedDataSource"
        PagerStyle-AlwaysVisible="true">
    

    Friday, January 25, 2013 5:50 PM

All replies

  • User-691245060 posted

    try by setting RadControl.PageSize = 10 in the page load....

    thanks,

    Sunday, January 27, 2013 6:28 AM
  • User1999579388 posted

    Hi,

    You could use @ramiramilu's method to setting RadControl.PageSize = 10 in the page load, it may help you, you could try that. If it doesn't help, please tell us as free.

    Thanks.

    Friday, February 1, 2013 5:41 AM
  • User-1034726716 posted

    There may be some here who knows about Telerik controls, but I think you stand a better chance by posting it at Telerik dedicated forums: http://www.telerik.com/community/forums.aspx

    Friday, February 1, 2013 12:36 PM