admin管理员组文章数量:1419168
I want to change the title of the "Export to Excel" button on Kendo Grid's toolbar, but although I tried to apply many different suggestions, still cannot update. How to change this?
<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>
I want to change the title of the "Export to Excel" button on Kendo Grid's toolbar, but although I tried to apply many different suggestions, still cannot update. How to change this?
<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>
Share
Improve this question
edited Dec 1, 2015 at 8:22
Jack
asked Dec 1, 2015 at 8:02
JackJack
1
1 Answer
Reset to default 7Instead of just passing a string in the toolbar: [...]
you can pass an object which with the right property will adjust the text.
change:
toolbar: ["excel"];
to
toolbar: [{name: 'excel', text: 'custom excel export button'}];
full example:
<script>
var grid = $("#grid").kendoGrid({
toolbar: [{name:'excel',text:'custom excel export button'}],
excel: {
fileName: "Export.xlsx",
filterable: true
},
}).data("kendoGrid");
</script>
本文标签: javascriptCannot change title of Kendo Export to Excel button on toolbarStack Overflow
版权声明:本文标题:javascript - Cannot change title of Kendo Export to Excel button on toolbar - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745303521a2652514.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论