I am rendering a Kendo Window in my view like the following:
While the window starts off hidden (Visible == false) upon view render, it still loads the content on view render. While this is likely due to using an iframe (so that the window can internally navigate between the different Feedback steps), is there any way to prevent the initial content load until the first time the window is opened (similar to how the ajax window works)?
@(Html.Kendo().Window() .Name("FeedbackWindow") .Title(Resources.Title_Feedback) .LoadContentFrom("Index", "Feedback") .Actions(action => action.Maximize().Close()) .Modal(true) .Iframe(true) .Visible(false) .AutoFocus(true) .Events(events => events.Refresh("FeedbackWindow_Refresh")))While the window starts off hidden (Visible == false) upon view render, it still loads the content on view render. While this is likely due to using an iframe (so that the window can internally navigate between the different Feedback steps), is there any way to prevent the initial content load until the first time the window is opened (similar to how the ajax window works)?
5 Answers, 1 is accepted
0
Hello Bobby,
Alex Gyoshev
Telerik
In order to achieve this, do not set the LoadContentFrom field initially, and call the client-side refresh method when you open the window:
var dialog = $("#FeedbackWindow").data("kendoWindow")
dialog.refresh('@Url.Action("Index", "Feedback")')
dialog.open();
Alex Gyoshev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Bobby
Top achievements
Rank 1
answered on 01 May 2014, 02:15 PM
Hi Alex,
If I remove the LoadContentFrom field and do the dalog.refresh("url"); dialog.open(); work-around that you propose, do I need to preform the special refresh call every time I open the window or just the first time?
Thanks.
If I remove the LoadContentFrom field and do the dalog.refresh("url"); dialog.open(); work-around that you propose, do I need to preform the special refresh call every time I open the window or just the first time?
Thanks.
0
Hello Bobby,
Alex Gyoshev
Telerik
It is necessary to do it only the first time. However, you can do it each time and refresh the content -- whichever seems more appropriate for the application.
Regards,Alex Gyoshev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Bobby
Top achievements
Rank 1
answered on 05 May 2014, 03:30 PM
Pity it's not an automatic function of the Visible == false setting rather than me having to explicitly handle it myself =/
0
We will consider changing this behavior for future versions. Thank you for the feedback.
Regards,
Alex Gyoshev
Telerik
Regards,
Alex Gyoshev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!