MVC Kendo Grid export to excel by clicking extenrally placed button -


i have special scenario excel export functionality on kendo-ui mvc grid.

scenario: export kendo mvc grid excel sheet , when clicking button placed outside of grid, don't want show or use default export excel button provided kendo, instead want use html input button. please me on this? appreciated.

please try below code snippet.

<div id="grid"></div> <input type="button" onclick="downlaodexcel()" value="export excel" /> <script>     $("#grid").kendogrid({         datasource: {             type: "odata",             transport: {                 read: "http://demos.telerik.com/kendo-ui/service/northwind.svc/products"             },             pagesize: 10         },         sortable: true,         pageable: true,         columns: [             { width: 300, field: "productname", title: "product name" },             { field: "unitsonorder", title: "units on order" },             { field: "unitsinstock", title: "units in stock" }         ]     });      function downlaodexcel() {         $("#grid").getkendogrid().saveasexcel();     } </script> 

let me know if concern.


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -