有没有办法在模态中删除模态确认中更改“是”和“否”文本按钮?
我试过这个并改变了我的信息但是我不能改变是和没有按钮文本
editing: {
mode: "form",
allowUpdating: true,
allowDeleting: true,
allowAdding: true,
texts: {
deleteRow: "delete",
editRow: "edit",
saveRowChanges: "save",
cancelRowChanges: "cancele",
confirmDeleteMessage: "are you sure?"
}
}
答案 0 :(得分:3)
要在确认对话框中自定义按钮文本,您可以使用localization.loadMessages()方法。用法非常简单:
DevExpress.localization.loadMessages({
en: { "Yes": "Remove it!", "No": "Don't remove it!" }
});
此sample演示了它的实际效果。
答案 1 :(得分:0)
谢尔盖的答案应该被标记为正确,但这里只是为了好玩的替代蛮力解决方案:
$('.dx-link-delete').on('click',
function(){setTimeout(
function(){
var btns = $('.dx-popup-normal').find('.dx-button-text');
btns.last().text('No thanks');
btns.first().text('Yes please');
},0);
}
);