saveAsCSV

Initiates the CSV export.

Calling this method could trigger the browser built-in popup blocker in some cases. To avoid that, always call it as a response to an end-user action e.g. button click.

This method does not fire the csvExport event.

Example - manually initiate CSV export

<button id="export">Export to CSV</button>
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" }
  ],
  dataSource: [
      { name: "Jane Doe", age: 30 },
      { name: "John Doe", age: 33 }
  ],
});
$("#export").click(function(e) {
    var grid = $("#grid").data("kendoGrid");
    grid.saveAsCSV();
});
</script>
In this article
saveAsCSV
Not finding the help you need?
Contact Support