我正在使用 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");
}))
关于c# - 如何更改 Kendo UI Grid 上的文本销毁或删除命令操作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12570188/