Hi,
I can see that the Grid component can produce PDF (and Excel) exports, which is ideal.
But, how can I invoke the functionality from outside of the native Grid toolbar?
In the example below, I want to invoke the PDF export of the Grid using the Toolbar component (though it could be any external stimulus)
Ultimately I want to do the same with Excel.
Any ideas would be welcome.
Many thanks
Nathan
I can see that the Grid component can produce PDF (and Excel) exports, which is ideal.
But, how can I invoke the functionality from outside of the native Grid toolbar?
In the example below, I want to invoke the PDF export of the Grid using the Toolbar component (though it could be any external stimulus)
01.@(Html.Kendo().ToolBar()02. .Name("ToolBar")03. .Items(items => 04. {05. items.Add().Type(CommandType.SplitButton).Text("Export").ImageUrl(Url.Content("~/Content/web/toolbar/save.png")).MenuButtons(menuButtons =>06. {07. menuButtons.Add().Text("Export to Excel").ImageUrl(Url.Content("~/Content/web/toolbar/save.png"));08. menuButtons.Add().Text("Export to PDF").ImageUrl(Url.Content("~/Content/web/toolbar/upload.png"));09. }); 10. })11. ) 12. @(Html.Kendo().Grid<RequestWorkflowWithWatcherViewModel>()13. .Name("grid")14. .Columns(columns =>15. {16.// columns stuff17. })18. .ToolBar(tools => 19. tools.Pdf())20. .Pdf(pdf => pdf21. .AllPages()22. .FileName("Kendo UI Grid Export.pdf")23. .ProxyURL(Url.Action("EnquiryExportToPdf", "Home"))24. ) 25. 26. ))Ultimately I want to do the same with Excel.
Any ideas would be welcome.
Many thanks
Nathan