This is a migrated thread and some comments may be shown as answers.
Export to Excel of client detail Template not working with external div click event
1 Answer 5 Views
This is a migrated thread and some comments may be shown as answers.
Mohammed
Top achievements
Rank 1
Veteran
Mohammed asked on 07 Jun 2020, 07:03 PM

Hi,

I have implemented the export to excel of client detail of Grid using function of export excel in the below link

 

http://docs.telerik.com/aspnet-mvc/helpers/grid/how-to/Export/detail-grid-export

 

But i am not able to implement the same function in external button or div click i tried passing event also but its not working, can you help on this,i dont want toolbar click instead external button click event export function should work.

Thanks

Mohammed

1 Answer, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 10 Jun 2020, 05:45 AM

Ho Mohammed,

The export to Excel function can be triggered using the saveAsExcel Grid method. Attached you will find a simple example of its usage. The Method is triggered on a button click. 

      $("#export").click(function(e) {
        var grid = $("#grid").data("kendoGrid");
        grid.saveAsExcel();
      });

The same JavaScript logic can be implemented in UI for ASP.NET MVC context.

Regards,
Petar
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
Mohammed
Top achievements
Rank 1
Veteran
Answers by
Petar
Telerik team
Share this question
or