I am using KendoUI controls with JavaScript with MVC. I have a popup created using "kendoWindow". its working mode, but when I press the ESC key, it automatically closes. I want to disable the ESC key so that the pop-up window can only be closed with the "Cancel" button or the "close" button.
Here is my Kendo window code.
var wndEditClient= $("#divEditClient")
.kendoWindow({
title: "Edit Client",
modal: true,
visible: false,
resizable: false,
width: 450,
actions: ["Close"]
}).data("kendoWindow");
wndEditClient.open();
Please suggest.
I tried the JavaScript keystroke event and all this but does not work.
$(document).bind("keypress", function (e) {
if (e.keyCode == 27) {
e.preventDefault();
}
});
Tried this but didn't work.
source
share