次のようなコンテンツとして、部分的なビュー (剣道グリッドを含む) で剣道ウィンドウを開く関数を用意します。
$('#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;
});
しかし、私もウィンドウを閉じたいです。グリッドのクリックまたはダブルクリック イベントでどうすればそれを行うことができますか? 手伝ってくれますか?ありがとうございました。:)