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

Custom export to excel button

1 Answer 1133 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 21 Nov 2014, 04:20 PM
I have a grid with a custom toolbar template defined, full of custom controls. I would like to add a button to export the grid contents to excel, however based on the example .ToolBar(tools => tools.Excel()) seems to just arbitrarily add a button to the toolbar. Is there a way to add my own button to my toolbar template and have it be recognized as the export to excel button?

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 24 Nov 2014, 04:46 PM
Hi Peter,


In the current case you could directly include the markup required for the Excel export button in the template.
<a class="k-button k-button-icontext k-grid-excel" href="#"><span class="k-icon k-i-excel"></span>Export to Excel</a>

The Grid will recognize the button by it's k-grid-excel CSS class.

Regards,
Dimiter Madjarov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Peter
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or