[英]How to change the text on Kendo UI Grid destroy or delete command action?
我正在使用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,
如果您使用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");
}))
更换
editable: "inline"
同
editable: {
confirmation: "Your custom message",
mode: "inline"
},
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.