Hello,
I've been trying to implement the following (I believe quite common) scenario:
I have a page with a Grid in it and an Window, declared like this:
@(Html.Kendo().Window()
.Name("detailsWindow")
.Title(Localizer["Manage an Object"])
.Content(Localizer["Loading..."])
.AutoFocus(true)
.Iframe(false)
.Draggable()
.Events(ev => ev.Close("detailsWindow_close"))
.Resizable()
.Visible(false)
.Deferred()
)
When the user double-clicks, the Window is refreshed with an URL of a partial view, the Window is centered and shown like this:
var
detailsWindow = $(
'#detailsWindow'
).data(
'kendoWindow'
);
kendoWindow.refresh(url).center().open();
The problem is that nothing seems to work in the contents of the Window:
- Kendo UI Date Time Pickers are not styled;
- The culture is not applied.
Obviously Kendo UI Javascripts are not applied to the new DOM elements in the Window.
My question is: Can I refresh Kendo UI somehow (preferably to the DOM elements in the Window only)?
Note: I have intentionally disabled iframes, because:
- I want to reduce markup going down the wire
- I use AJAX forms in the Window
- I reuse the actions and emit a regular view or a partial view depending on the request type.