Grid.Pageable(false) but Grid still show DataSource.PageSize(m) records only

4 posts, 0 answers
  1. Chris
    Chris avatar
    116 posts
    Member since:
    Oct 2015

    Posted 22 Nov 2017 Link to this post

    HI

    I found there have a problem about Grid.Pageable() and DataSource.PageSize().

    If you set Grid.Pageable(false) and Grid becomes unpageable(this is OK)
    but DataSource.PageSize(m) setting still applied (Grid still show m records at once, not all records).

    I think when Grid.Pageable(false) and Grid should show all records absolutely, RIGHT ? 

      @(Html.Kendo().Grid(Model.MyList1)
        .Name("MyList1Grid")
        .Pageable(pageable => pageable.Enabled(false))
        ...
        .DataSource(dataSource => 
        {
          dataSource.Ajax()
            .PageSize(3)
            .ServerOperation(false)
            .Model(model => model.Id(m => m.UniqueID))
        })
        ...;

    *Telerik DevCraft UI for ASP.NET MVC R2 2017 SP1

    Best regards

    Chris

     

     

  2. Stefan
    Admin
    Stefan avatar
    2893 posts

    Posted 24 Nov 2017 Link to this post

    Hello, Chris,

    The described result is expected because the DataSource is working on the data level only. The pageSize set in the dataSource will determine the number of items in its view, and the pageable property of the Grid will determine if there will be a visible UI rendered to control the pages.

    The main reason is that the Grid has a virtual scrolling and endless scrolling features which depend on the pageSize of the dataSource and at the same time does not use the Pageable property of the Grid:

    https://docs.telerik.com/kendo-ui/controls/data-management/grid/appearance#virtual-scrolling

    https://docs.telerik.com/kendo-ui/controls/data-management/grid/appearance#endless-scrolling

    Please let me know if you need additional information on this matter.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Chris
    Chris avatar
    116 posts
    Member since:
    Oct 2015

    Posted 28 Nov 2017 in reply to Stefan Link to this post

    OK, I will remove the dataSource.PageSize(m) setting.

    And I think the API Document should describe this situation clearly : 

    pageSize
    https://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-pageSize

    Best regards

    Chris

     

     

  4. Stefan
    Admin
    Stefan avatar
    2893 posts

    Posted 29 Nov 2017 Link to this post

    Hello, Chris,

    Thank you for the provided feedback, it is highly appreciated.

    We will discuss if we can make the description more accurate as we constantly try to improve our documentation.

    Currently, this is not added as the DataSource is an independent component and may be used with widgets other than the Grid.

    We will consider adding it in the Grid pageable description.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top