Completed
Last Updated: 17 Feb 2022 14:19 by ADMIN
Armineh
Created on: 13 May 2020 16:01
Category: Grid
Type: Feature Request
8
grid page navigation number of pages setting
I want to reduce length of pagination selection below the grid  ( currently is showing as   << 1  2 3 4 5 6 7 8 9 10 ...>>     but I want to have it like << 1 2 3 ....>>)
5 comments
ADMIN
Joana
Posted on: 17 Feb 2022 14:19

Hello everyone,

Since 2.26 Blazor release, it is possible to configure the ButtonsCount in the Grid Pager through `GridPagerSettings` tag. You could observe the behavior on our demos site, or the repl snippet to test further:

https://blazorrepl.telerik.com/mQklvLvA00g9Y8vD53

https://demos.telerik.com/blazor-ui/grid/paging 

Regards,
Joana
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

ADMIN
Marin Bratanov
Posted on: 24 Feb 2021 09:30

Hi Oemer,

If you use the OnRead event you should be able to get the correct TotalCount of the actual data source - it lets you take into account the searchbox input as the grid adds filter descriptors for it in the request - and so you can also update the Total of the pager to be correct.

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Vahap.Demir
Posted on: 23 Feb 2021 11:59
I am using version 2.21.1 and if I use this custom pager solution, filtering by searchbox does not sync with the pager.
ADMIN
Marin Bratanov
Posted on: 13 May 2020 16:08

Here's also a workaround that directly uses the pager component

<div class="custom-pager">
    <TelerikGrid Data="@Data" Pageable="true" @bind-Page="@CurrentPage" PageSize="@PageSize" AutoGenerateColumns="true">
    </TelerikGrid>

    <TelerikPager Total="@Data.Count()" @bind-Page="@CurrentPage" PageSize="@PageSize" ButtonCount="3" />
</div>

@code {
    int CurrentPage { get; set; } = 1;
    int PageSize { get; set; } = 5;
    IEnumerable<SampleData> Data { get; set; } = Enumerable.Range(1, 300).Select(x => new SampleData
    {
        Id = x,
        Name = "name " + x,
        Team = "team " + x % 5,
        HireDate = DateTime.Now.AddDays(-x).Date
    });

    public class SampleData
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Team { get; set; }
        public DateTime HireDate { get; set; }
    }
}

<style>
    /* hide the built-in grid pager */
    .custom-pager .k-grid .k-pager-wrap {
        display: none;
    }

    /* just to showcase how the wrapper contrls the width of both components since they are now separate */
    .custom-pager{
        width: 600px;
    }
</style>

ADMIN
Marin Bratanov
Posted on: 13 May 2020 16:02

Perhaps a property similar to the Pager component's ButtonCount could be exposed on the grid as well.

 

Regards,
Marin Bratanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.