Asp.net Devexpress Gridview中的按钮没有响应
我需要在使用GridViewCommandColumnCustomButton属性创建的删除按钮上设置确认消息。 将客户端事件添加到“我的网格”后,除“删除”按钮外,其他按钮(在同一个AspxGridview中)不会触发事件 我为邮件创建的事件是:Asp.net Devexpress Gridview中的按钮没有响应,asp.net,devexpress,Asp.net,Devexpress,我需要在使用GridViewCommandColumnCustomButton属性创建的删除按钮上设置确认消息。 将客户端事件添加到“我的网格”后,除“删除”按钮外,其他按钮(在同一个AspxGridview中)不会触发事件 我为邮件创建的事件是: grid.ClientSideEvents.CustomButtonClick = "function (s, e) { if (e.buttonID == 'DELETE'){ e.processOnServer = confirm('Are yo
grid.ClientSideEvents.CustomButtonClick = "function (s, e) { if (e.buttonID == 'DELETE'){ e.processOnServer = confirm('Are you sure you want to delete this item?'); }}";
如果我从服务器端删除所有触发事件并按预期工作的按钮的代码,但如果我添加上述代码,删除按钮将正常工作,但其他按钮不会触发任何事件
PS:所有的按钮都是以同样的方式创建的我更新了如下代码。现在它起作用了
grid.ClientSideEvents.CustomButtonClick = "function (s, e) { if (e.buttonID == 'DELETE'){ e.processOnServer = confirm('Are you sure you want to delete this Voucher?');} "+
" else if (e.buttonID == 'EDIT'){ e.processOnServer = true; } " +
" else if (e.buttonID == 'UPDATE'){ e.processOnServer = confirm('Are you sure you want to Update this Voucher?'); } }";
除了任何简单的答案,请分享
谢谢:)