I set up a window using the Fluent wrappers like so:
@(Html.Kendo().Window().Name("detailsWindow").Visible(false))
I have a JavaScript function (wired to a grid's custom command - but I don't think that's relevant) that opens the window and refreshes it based on the grid data:
function popupDetailsWindow(e, a){
var detailsWindow = $('#detailsWindow').data('kendoWindow');
var item = this.dataItem($(e.currentTarget).closest("tr"));
var url = '@Url.Action("Details", "Controller", new { id = "__id__" })';
var refreshUrl = url.replace('__id__', item.ItemId);
detailsWindow.refresh(refreshUrl);
detailsWindow.open();
}
This works fine the first time, then fails on the refresh() call, with an error that 'detailsWindow' is undefined. When I remove the MVC helper code, put in a div with Id "detailsWindow", and call $('detailsWindow').kendoWIndow(); after the document loads, it works fine. Is this a bug in the wrapper code, or am I doing something wrong?
@(Html.Kendo().Window().Name("detailsWindow").Visible(false))
I have a JavaScript function (wired to a grid's custom command - but I don't think that's relevant) that opens the window and refreshes it based on the grid data:
function popupDetailsWindow(e, a){
var detailsWindow = $('#detailsWindow').data('kendoWindow');
var item = this.dataItem($(e.currentTarget).closest("tr"));
var url = '@Url.Action("Details", "Controller", new { id = "__id__" })';
var refreshUrl = url.replace('__id__', item.ItemId);
detailsWindow.refresh(refreshUrl);
detailsWindow.open();
}
This works fine the first time, then fails on the refresh() call, with an error that 'detailsWindow' is undefined. When I remove the MVC helper code, put in a div with Id "detailsWindow", and call $('detailsWindow').kendoWIndow(); after the document loads, it works fine. Is this a bug in the wrapper code, or am I doing something wrong?