Hello,
I have a problem with the Excel export on the datagrid when using a script built using the custom download builder tool (http://www.telerik.com/download/custom-download). Version 2015.3.930.
To reproduce the problem I used this simple page :
<!DOCTYPE html>
<
html
>
<
head
>
<
style
>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</
style
>
<
title
></
title
>
<
link
rel
=
"stylesheet"
href
=
"//kendo.cdn.telerik.com/2015.3.930/styles/kendo.common-material.min.css"
/>
<
link
rel
=
"stylesheet"
href
=
"//kendo.cdn.telerik.com/2015.3.930/styles/kendo.material.min.css"
/>
<
script
src
=
"//kendo.cdn.telerik.com/2015.3.930/js/jquery.min.js"
></
script
>
<
script
src
=
"//kendo.cdn.telerik.com/2015.3.930/js/jszip.min.js"
></
script
>
<
script
src
=
"//kendo.cdn.telerik.com/2015.3.930/js/kendo.all.min.js"
></
script
>
</
head
>
<
body
>
<
script
src
=
"http://demos.telerik.com/kendo-ui/content/shared/js/products.js"
></
script
>
<
div
id
=
"example"
>
<
div
id
=
"grid"
></
div
>
<
script
>
$(document).ready(function() {
$("#grid").kendoGrid({
toolbar: ["excel"],
excel: {
fileName: "Kendo UI Grid Export.xlsx",
proxyURL: "//demos.telerik.com/kendo-ui/service/export",
filterable: true
},
dataSource: {
data: products,
schema: {
model: {
fields: {
ProductName: { type: "string" },
UnitPrice: { type: "number" },
UnitsInStock: { type: "number" },
Discontinued: { type: "boolean" }
}
}
},
},
height: 550,
scrollable: false,
sortable: false,
filterable: false,
columns: [
"ProductName",
{ field: "UnitPrice", title: "Unit Price", format: "{0:c}", width: "130px" },
{ field: "UnitsInStock", title: "Units In Stock", width: "130px" },
{ field: "Discontinued", width: "130px" }
]
});
});
</
script
>
</
div
>
</
body
>
</
html
>
With this code, the Excel export works well.
Now, if instead of the kendo.all.min.js I will use a custom script with two configurations :
1) I select only the Grid component with the Excel export plugin --> the export works.
2) I select the Grid component ​with the Excel export plugin AND the Gantt componant --> the export failed with the javascript error: Object doesn't support property or method 'saveAsExcel'
The error only comes when the Gantt component is embedded int the custom script, and I need it...
I have made another test using the builder tool with ALL the components selected : it failed too. It makes me feel that the kendo.all.min.js is not the same script as the one the tool built (when selected all the components).
Any idea ?