Export to Excel of client detail Template not working with external div click event

2 posts, 0 answers
  1. Mohammed
    Mohammed avatar
    26 posts
    Member since:
    May 2020

    Posted 07 Jun 2020 Link to this post

    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

  2. Petar
    Admin
    Petar avatar
    509 posts

    Posted 10 Jun 2020 Link to this post

    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.
Back to Top