The widget instance which fired the event.
The generated CSV string. Modifications of the CSV content will reflect in the output file.
If invoked the grid will not save the generated file.
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
toolbar: ["csv"],
columns: [
{ field: "name" }
],
dataSource: [
{ name: "Jane Doe"},
{ name: "John Doe"}
],
csvExport: function(e) {
console.log(e.csv);
}
});
var grid = $("#grid").data("kendoGrid");
grid.wrapper.find(".k-grid-csv").trigger("click");
</script>
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
toolbar: ["csv"],
columns: [
{ field: "name" }
],
dataSource: [
{ name: "Jane Doe"},
{ name: "John Doe"}
]
});
var grid = $("#grid").data("kendoGrid");
grid.bind("csvExport", function(e) {
console.log(e.csv);
});
grid.wrapper.find(".k-grid-csv").trigger("click");
</script>