加載conent您需要獲得窗口對象持有,設置其url
並在查詢字符串傳遞給url屬性。這個工作對我來說:
var window = $("#Details").data("kendoWindow");
window.refresh({
url: '/YourController/YourAction/......',
});
window.open().center();
此外,還可以在一些數據傳遞給action
還有:
window.refresh({
url: '/YourController/YourAction/......',
data: { id: 10, enterpriseId: 88}
});
或者你copuld只是有一個功能,動態創建的窗口,並設置它的內容url帶有一些參數:
function createKendoWindow(contentUrl) {
$(document.body).append('<div id="Window"></div>');
$('#Window').kendoWindow({
title: "Log In",
modal: true,
resizable: false,
width: 400,
content: contentUrl,
visible: false,
minHeight: 350,
animation: {
open: {
effects: "expandVertical",
duration: 1000
},
},
close: function() {
setTimeout(function() {
$('#Window').kendoWindow('destroy');
}, 200);
}
}).html('<img src="761.gif" />').data('kendoWindow').center().open();
}
感謝您的意見。但'kendoWindow'是什麼?我想要加載視圖。 – Pouya
它refernce TA確保它窗口 –
如果想從CONTROLER品牌加載視圖編輯和參數我寫這篇$(「#詳細信息」)發送1的數據(「品牌/編輯/ 1」)的open()。;但我得到錯誤,請幫助我。感謝 – Pouya