Custom Pager styling kendo grid

1 Answer 141 Views
Grid
Vikas
Top achievements
Rank 1
Iron
Iron
Vikas asked on 22 Oct 2023, 06:15 PM

 

Can we achieve the below pager template in Kendo grid

1 Answer, 1 is accepted

Sort by
0
Accepted
Hetali
Telerik team
answered on 25 Oct 2023, 09:02 PM

Hi Vikas,

Use Pager Template of the Kendo UI Grid to make the desired changes. For example:

<kendo-grid>
  <ng-template kendoPagerTemplate 
    let-currentPage="currentPage" 
    let-pageSize="pageSize" 
    let-total="total" 
  >
    <span>
      Showing 
      <span style="color: blue">{{currentPage * pageSize}}</span> 
      of {{ total }} records
    </span>    
    <kendo-pager-spacer></kendo-pager-spacer>
    <kendo-pager-prev-buttons></kendo-pager-prev-buttons>
    <kendo-pager-numeric-buttons [buttonCount]="5"></kendo-pager-numeric-buttons>
    <kendo-pager-next-buttons></kendo-pager-next-buttons>
  </ng-template>
</kendo-grid>


Hide the unwanted buttons using the following CSS:

.k-pager-first, 
.k-pager-last,
.k-pager-numbers .k-pager-nav:last-child {
  display: none;
}


Output:

I have demonstrated the above snippets in this StackBlitz example

Please give it a try and let me know if it helps or if I can further assist you.

Regards,
Hetali
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Tags
Grid
Asked by
Vikas
Top achievements
Rank 1
Iron
Iron
Answers by
Hetali
Telerik team
Share this question
or