Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 961
Rodney Hickman Avatar asked Sep 21 '12 17:09

Rodney Hickman


People also ask

How do I add Edit button in kendo grid?

How can i enable the edit of the cell in which the button is ? $(grid. tbody). on("click", "[name='EditCell']", function (e) { var cellElement = this; var cell = $(cellElement); var grid = $("#grid").

How do I add a custom button to Kendo grid toolbar?

One way you can add a custom button is to include a custom command button in the toolbar. Next, on the click event of the button, add the logic to open the Kendo UI Window: $("#grid"). on("click", "#customButton", function (e) { e.


2 Answers

The way to do this is using the following syntax:

$reports.kendoGrid(
{
    dataSource: dataSource,
    toolbar: [{ name: "create", text: "Add" }],  
like image 66
Rodney Hickman Avatar answered Oct 21 '22 07:10

Rodney Hickman


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"}
like image 33
Gyan Chandra Srivastava Avatar answered Oct 21 '22 07:10

Gyan Chandra Srivastava