This is a migrated thread and some comments may be shown as answers.

Paging Icon

3 Answers 329 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Junfeng
Top achievements
Rank 1
Junfeng asked on 25 May 2020, 05:56 PM
Based on the article here, it says we can customize the Pager template:
https://www.telerik.com/kendo-angular-ui/components/grid/paging/#toc-pager-template

Is there a way i can change the ICONs of the <kendo-pager-prev-buttons> or <kendo-pager-next-buttons> ?

3 Answers, 1 is accepted

Sort by
0
Preslava
Telerik team
answered on 26 May 2020, 07:18 AM

Hello Junfeng,

The default arrow icons of the Grid Pager can be changed by setting ViewEncapsulation to None and then overwriting the styles responsible for the rendered icons. 

I have modified one of our documentation examples in stackblitz, by using our font icons

https://stackblitz.com/edit/angular-jffu7o?file=app/app.component.ts

The content property is used for specifying the selected icon. More information on how this works could be found here:

https://www.telerik.com/kendo-angular-ui/components/styling/icons/#toc-using-unicode-characters

Alternatively, the styles can be overwritten globally.

https://stackblitz.com/edit/angular-eyd5qw?file=index.html

I hope this helps. Let me know should there be further questions.

Regards,
Preslava
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.
0
Junfeng
Top achievements
Rank 1
answered on 26 May 2020, 12:02 PM
Hi Preslava, 

Thank you so much for the example. 

I have another question, is it possible to remove the icon and change it something else like text ? i have a requirement that needs it to be a text and style it.
0
Preslava
Telerik team
answered on 27 May 2020, 09:04 AM

Hello Junfeng,

For this scenario,  I would suggest to use a template with the PagerTemplateDirective.  Thus, it would be possible to customize the entire content of the pager, as per requirements. 

https://www.telerik.com/kendo-angular-ui/components/grid/paging/#toc-pager-template

By using a template, the developer is responsible for handling the required logic. 

I have modified the example from the provided link above accordingly:

https://stackblitz.com/edit/angular-bezegw?file=app/app.component.ts

I hope this helps. Let me know should there be further questions.

Regards,
Preslava
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.
Tags
Grid
Asked by
Junfeng
Top achievements
Rank 1
Answers by
Preslava
Telerik team
Junfeng
Top achievements
Rank 1
Share this question
or