Using a Kendo Grid, how do you change the wording on the “Create” button in the toolbar?

别来无恙 提交于 2021-02-07 11:32:30

问题


I'm using a Kendo Grid I added the "create" to do an inline add of a record. How can I change the wording on the add button? Currently it reads: "Add a new Record" I want to simplify it to read just "Add" and I'd also like to keep the same Icon.

My code looks like:

$reports.kendoGrid(
{
    dataSource: dataSource,
    toolbar: ["create"],
    ...

Any suggestions would be greatly appreciated.


回答1:


The way to do this is using the following syntax:

$reports.kendoGrid(
{
    dataSource: dataSource,
    toolbar: [{ name: "create", text: "Add" }],  



回答2:


you can find it in js and you have to chenge from there

you have to change it by the configuration this link will help you http://www.kendoui.com/documentation/ui-widgets/grid/configuration.aspx

hunted solution its perfect tally work in kendo.all.min.js or kendo.all.js which you are using you will find below line

{create:{text:"Add new record",imageClass:"k-add",className:"k-grid-add",iconClass:"k-icon"}

you will get the result

change it with

   {create:{text:"Add ",imageClass:"k-add",className:"k-grid-add",iconClass:"k-icon"}


来源:https://stackoverflow.com/questions/12535467/using-a-kendo-grid-how-do-you-change-the-wording-on-the-create-button-in-the

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!