Kendo Grid 上的自定义删除确认弹出窗口 [英] Custom Delete Confirmation popup on Kendo Grid

查看:34
本文介绍了Kendo Grid 上的自定义删除确认弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Kendo 网格,我需要根据要删除的行中的数据自定义删除确认消息框.我有一个自定义的通用消息作为网格配置的一部分,如下所示.

I have a Kendo grid where I need to customize the delete confirmation message box based on data in row being deleted. I have a customized general message as part of Grid configuration as below.

 editable: {
     confirmation: "Are you sure that you want to delete this record?",
     mode: "popup",
     template: kendo.template($("#popup-editor").html())
}

我曾考虑使用 remove 事件处理程序,但在行被删除后触发.

I was looked at using the remove event handler, but that fires after the row has been deleted.

推荐答案

我猜您需要手动执行此操作.只需向网格添加一个自定义按钮,即可调用您的代码来删除该项目.

I am guessing you will need to do this manually. Simply add a custom button to the grid, that calls your code to delete the item.

Kendo Grid 自定义命令 http://demos.kendoui.c​​om/web/网格/自定义命令.html

Kendo Grid Custom command http://demos.kendoui.com/web/grid/custom-command.html

示例 jsbin http://jsbin.com/OZeLuXA/1/edit

这篇关于Kendo Grid 上的自定义删除确认弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆