无法更改工具栏上 Kendo 导出到 Excel 按钮的标题
Cannot change title of Kendo Export to Excel button on toolbar
我想更改 Kendo Grid 工具栏上 "Export to Excel" 按钮的标题,但尽管我尝试应用许多不同的建议,但仍然无法更新。如何更改?
<script>
var grid = $("#grid").kendoGrid({
toolbar: ["excel"],
excel: {
text: "Test 1", //did not make any sense
title: "Test 2", //did not make any sense
fileName: "Export.xlsx",
filterable: true
},
//code omitted for brevity
}).data("kendoGrid");
</script>
除了在 toolbar: [...]
中传递一个字符串,您还可以传递一个对象,使用右边的 属性 将调整文本。
变化:
toolbar: ["excel"];
到
toolbar: [{name: 'excel', text: 'custom excel export button'}];
完整示例:
<script>
var grid = $("#grid").kendoGrid({
toolbar: [{name:'excel',text:'custom excel export button'}],
excel: {
fileName: "Export.xlsx",
filterable: true
},
}).data("kendoGrid");
</script>
我想更改 Kendo Grid 工具栏上 "Export to Excel" 按钮的标题,但尽管我尝试应用许多不同的建议,但仍然无法更新。如何更改?
<script>
var grid = $("#grid").kendoGrid({
toolbar: ["excel"],
excel: {
text: "Test 1", //did not make any sense
title: "Test 2", //did not make any sense
fileName: "Export.xlsx",
filterable: true
},
//code omitted for brevity
}).data("kendoGrid");
</script>
除了在 toolbar: [...]
中传递一个字符串,您还可以传递一个对象,使用右边的 属性 将调整文本。
变化:
toolbar: ["excel"];
到
toolbar: [{name: 'excel', text: 'custom excel export button'}];
完整示例:
<script>
var grid = $("#grid").kendoGrid({
toolbar: [{name:'excel',text:'custom excel export button'}],
excel: {
fileName: "Export.xlsx",
filterable: true
},
}).data("kendoGrid");
</script>