Hello im using KendoWindow and works fine but i can't find how to pass parameter, now im using MVC and passing the parameter throw slash number, is any other way?
$(document).ready(function () { $("#window").kendoWindow({ content: "AjaxContent/5", title: "Async Window Content" }); }); Thanks Santiago.
5 Answers, 1 is accepted
0
Phil
Top achievements
Rank 2
answered on 19 Jul 2012, 12:16 AM
Hi Santiago:
Need a control to place a value and then add it to the action string.
Phil
Need a control to place a value and then add it to the action string.
var id = "5";$(document).ready(function () { $("#window").kendoWindow({ content: "/Window/AjaxContent/" + id, title: "Async Window Content" });});Phil
0
Phil
Top achievements
Rank 2
answered on 19 Jul 2012, 10:05 PM
Hi Santiago:
I went for a walk with my wife, so I just posted my last post. Here is a more complete solution. I am accessing the Northwind db employee table. I am displaying an id from an input numeric textbox:
Phil
P.S.
I changed the winOpen to:
var kW = $("#kjWindow").kendoWindow({
...
}).data("kendoWindow");
kW.open();
I went for a walk with my wife, so I just posted my last post. Here is a more complete solution. I am accessing the Northwind db employee table. I am displaying an id from an input numeric textbox:
<label for="employId">Employee Id:</label><input id="employId" style="width:90px" /><button id="open" class="k-button">Open</button><div id="kjWindow"></div><script type="text/javascript"> $(document).ready(function () { $("#employId").kendoNumericTextBox( { placeholder: "Enter Employee Id", max: "9", min: "1", value: "2" }); // $("#open").bind("click", winOpen); }); function winOpen() { var id = document.getElementById("employId").value; $("#kjWindow").kendoWindow({ title: "Employee Detail", width: "750px", height: "480px", content: "/Windows/EmployeeDetail_View/" + id, modal: true, actions: ["Close", "Refresh", "Maximize"] }); }</script>Phil
P.S.
I changed the winOpen to:
var kW = $("#kjWindow").kendoWindow({
...
}).data("kendoWindow");
kW.open();
0
Santiago
Top achievements
Rank 1
answered on 19 Jul 2012, 10:08 PM
Perfect, but is there any other way to pass parameter ?
Thanks
Thanks
0
Phil
Top achievements
Rank 2
answered on 24 Jul 2012, 11:53 PM
Hi Santiago:
The docs say
should work, but I have not been able to consistently get it to work. It works only once.
Phil
The docs say
kW.refresh({ url: "/Windows/EmployeeDetail_View/", data: { id: id }});Phil
0
Phil
Top achievements
Rank 2
answered on 29 Aug 2012, 01:47 AM
Hi Santiago:
I am back to Windows, so I got my last suggestion to work as follows:
Hope it helps...
Phil
I am back to Windows, so I got my last suggestion to work as follows:
function winOpen() { var eId = document.getElementById("employId").value; // kjWin = $("#kjWindow").kendoWindow({ title: "Employee Detail", width: "750px", height: "480px", modal: true, actions: ["Close", "Refresh", "Maximize"] }).data("kendoWindow").refresh({ url: "/Grid/EmployeeDetail_View/", data: { id: eId } }); kjWin.open();}Phil