有一个功能可以打开一个带有部分视图(带有剑道网格)的剑道窗口,内容如下:
$('#CodUnePai').keydown(function (event) {
if (event.keyCode == 115) {
event.preventDefault();
var myWindow = $("#dialog").kendoWindow({
actions: ["Minimize", "Maximize", "Close"],
content: {
url: '@Url.Action("BSfunePartial","BSfune")',
},
draggable: true,
height: "300px",
width: "300px",
modal: false,
position: {
top: 300,
left: 1200
},
resizable: true,
title: "Unidades de Negócio",
visible: false
});
$("#dialog").data("kendoWindow").center();
$("#dialog").data("kendoWindow").open();
}
});
当单击网格时,我将数据传递给我的 CodUnePai,如下所示:
$("#BSfunePartialGrid").click(function (e) {
var selectedItem = e.target.innerText;
this.ownerDocument.forms.FormCreate.CodUnePai.value = selectedItem;
});
但我也想关闭窗口。如何在网格的单击或双击事件上做到这一点?你能帮我吗?谢谢。:)