我想更改"导出到Excel&#34的标题; Kendo Grid工具栏上的按钮,但是虽然我尝试应用了许多不同的建议,但仍然无法更新。如何改变这个?
<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>
答案 0 :(得分:6)
您可以传递一个具有正确属性的对象来调整文本,而不是只传递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>