how to Avoid the Unwanted popup window creation wh

2019-08-27 21:32发布

问题:

am Using KEndo Grid .. popup editing For Toolbar and inline Editing for Command

$(".k-grid-popup", grid.element).on("click", function () {
var popupWithOption = {
mode: "popup",
template: kendo.template($("#customPopUpTemplate").html()),
window: {
title: "Your Title"
}
};
grid.options.editable = popupWithOption ;
grid.addRow();
grid.options.editable = "inline";
});

This Code is Working Fine,,If i Click Edit button And Update the Record then i click add button means that 2 popup window will opened,, How to Restrict this Problem

thanks in advance..

回答1:

the problem with the editable settings is that since you have set up popup edit in your grid, every time you execute an edit command will open the popup window.

To achieve the functionality you are looking for, you should set up "inline-cell" edit and then with your custom command for edit create your own popup to edit the line.

You can't have both inline and popup edit by default in kendo grid.

Regards