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>
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745303521a4621579.html
评论列表(0条)