Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the text on Kendo UI Grid destroy or delete command action?

I'm using a KendoUI KendoGrid. I have a column with delete button or "destroy" action. Kendo displays an alert box with the text "Are you sure you want to delete this record?" I need this text to be more specific to my situation. How do you customize this text?

Any help would be appreciated.

My code for adding the columns is:

$reports.kendoGrid(
{
    dataSource: dataSource,
    pageable: {
        refresh: true,
        pageSizes: true
    },
    toolbar: [{ name: "create", text: "Add" }],
    columns:
    [
        { field: 'name', title: 'Report', sortable: true },
        { command: ["edit", "destroy"], title: " ", width: "180px", } 
    ],
    editable: "inline",
    selectable: true,
like image 459
Rodney Hickman Avatar asked Sep 24 '12 17:09

Rodney Hickman


1 Answers

If you are using Kendo UI for ASP.NET MVC you can use DisplayDeleteConfirmation

        @(Html.Kendo().Grid<OrdersViewModel>()
              .Name("Orders")
              .HtmlAttributes(new {style = "height: 100%; border-width: 0;"})
              .Columns(c =>
                  {
                     c.Bound(p => p.Id)
                     .Width(50)
                  }
             .Editable(editable =>
                  {
                     editable.Mode(GridEditMode.InLine);
                     editable.DisplayDeleteConfirmation("Your Message here");
                  }))
like image 75
Vlad Bezden Avatar answered Sep 27 '22 00:09

Vlad Bezden