Hi,
I have a kendo window (child view) defined in the parent view which is set to hidden until the "Add" button is clicked.
This window has the "LoadContentFrom" property set which calls a method in the controller.
The parameters are currently static with only one value used every time the window is opened but is there any way to change just the parameters for "LoadContentFrom" using jquery?
This is what the parent view looks like:
@(Html.Kendo().Window()
.Name("PurchaseOrderDetailWindow")
.Title("Update Purchase Order")
.Draggable()
.Visible(false)
.Iframe(true)
.Width(1000)
.Height(662)
.Modal(true)
.LoadContentFrom("PODetailView", "Home", new { isNewPO = "true", companyId = 2 })
.Actions(actions => actions.Minimize().Maximize().Close())
.Events(e => e.Close("WindowClosed"))
)
This is what the add button looks like (static loading of data)
// Open window for new Purchase Order creation.
function AddPurchaseOrder(e) {
var window = $("#PurchaseOrderDetailWindow").data("kendoWindow");
window.center().open();
}
Is there any way to modify the above AddPurchase method to dynamically change "LoadContentFrom("PODetailView", "Home", new { isNewPO = "true", companyId = 2 })"
Mainly the "new {isNewPO = ....}" section,
Thanks in advance
I have a kendo window (child view) defined in the parent view which is set to hidden until the "Add" button is clicked.
This window has the "LoadContentFrom" property set which calls a method in the controller.
The parameters are currently static with only one value used every time the window is opened but is there any way to change just the parameters for "LoadContentFrom" using jquery?
This is what the parent view looks like:
@(Html.Kendo().Window()
.Name("PurchaseOrderDetailWindow")
.Title("Update Purchase Order")
.Draggable()
.Visible(false)
.Iframe(true)
.Width(1000)
.Height(662)
.Modal(true)
.LoadContentFrom("PODetailView", "Home", new { isNewPO = "true", companyId = 2 })
.Actions(actions => actions.Minimize().Maximize().Close())
.Events(e => e.Close("WindowClosed"))
)
This is what the add button looks like (static loading of data)
// Open window for new Purchase Order creation.
function AddPurchaseOrder(e) {
var window = $("#PurchaseOrderDetailWindow").data("kendoWindow");
window.center().open();
}
Is there any way to modify the above AddPurchase method to dynamically change "LoadContentFrom("PODetailView", "Home", new { isNewPO = "true", companyId = 2 })"
Mainly the "new {isNewPO = ....}" section,
Thanks in advance