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

Export and Toolbar button styling

5 Answers 466 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Reid
Top achievements
Rank 2
Reid asked on 09 Aug 2018, 04:37 PM

I cannot figure out how to change the buttons on the grids where "Export to Excel" or "Export PDF" is enabled.  What style can I set (override) that will control the .css for the buttons?

5 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 13 Aug 2018, 12:26 PM
Hi Reid,

Each toolbar button of the Grid has an unique CSS class (k-grid-[toolName]), so you can style the buttons directly through these classes like in the following Dojo: https://dojo.telerik.com/IbUVUKah

Namely:
.k-grid .k-grid-excel{
  color: #fff;
  background-color: #00f;
}
.k-grid .k-grid-pdf{
  color: #fff;
  background-color: #f00;
}

Regards,
Vessy
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Reid
Top achievements
Rank 2
answered on 13 Aug 2018, 02:23 PM

Hi,

I added those styles and set a desired color but it has no effect.

1
Accepted
Vessy
Telerik team
answered on 14 Aug 2018, 11:18 AM
Hi Reid,

Did you try making the CSS selectors heavier or adding an "!important" statement to the applied styles (note, that the selectors for the Less and Sass themes are different). What is the Theme that you are using? Meanwhile, you can try to style the buttons with the following selectors:
.k-grid .k-button.k-grid-excel {
    color: #fff ;
    background-color: #00f ;
    background-image: none;
}
.k-grid .k-button.k-grid-pdf {
    color: #fff ;
    background-color: #f00 ;
    background-image: none;
}

Regards,
Vessy
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Reid
Top achievements
Rank 2
answered on 14 Aug 2018, 07:15 PM
Thank you for that reply.  That works!
0
Vessy
Telerik team
answered on 15 Aug 2018, 04:56 AM
Hi,

You are welcome, Reid - I am glad my suggestion was helpful for you. Let us know whenever you need further assistance with our widgets.

Regards,
Vessy
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Reid
Top achievements
Rank 2
Answers by
Vessy
Telerik team
Reid
Top achievements
Rank 2
Share this question
or