如何更改Kendo UI Grid上的文本销毁或删除命令操作?

Rod*_*ney 13 javascript c# jquery telerik kendo-ui

我正在使用KendoUI KendoGrid.我有一个带删除按钮或"销毁"操作的列.Kendo会显示一个警告框,其中包含"您确定要删除此记录吗?" 我需要这个文本更具体地说明我的情况.你如何自定义这个文本?

任何帮助,将不胜感激.

我添加列的代码是:

$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,
Run Code Online (Sandbox Code Playgroud)

Vla*_*den 25

如果您使用Kendo UI for ASP.NET MVC,则可以使用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");
                  }))
Run Code Online (Sandbox Code Playgroud)


MrO*_*ian 10

根据Kendo Grid文档:

editable.confirmation布尔| 串

定义删除项目时将在确认框中使用的文本.

  • 谢谢:我把以下一行用于可编辑:可编辑:{模式:"内联",确认:"哦,疯了!你确定要删除此报告以及包含所有内容的所有部分吗?" }, (2认同)