exportToExcel: function () { var that = this; $("#homeBody").addClass("onloading"); var exportOption = that.options["export"]; var filterdata = kendo.stringify(that.options["filter"]); var filter = that.dataSource.filter(); var pageSize = that.dataSource.pageSize(); that.dataSource.pageSize(that.dataSource.total()); // Define the data to be sent to the server to create the spreadsheet. data = { column: JSON.stringify(that.columns), data: JSON.stringify(that.dataSource.view()), filter: filterdata, title: exportOption.title }; that.dataSource.pageSize(pageSize) // Create the spreadsheet. $.post(exportOption.createUrl, data, function () { // Download the spreadsheet. window.location.replace(kendo.format("{0}?title={1}", exportOption.downloadUrl, exportOption.title)); $("#homeBody").removeClass("onloading"); }); },
添加回答
举报
0/150
提交
取消