This question is locked. New answers and comments are not allowed.
Hi Telerik,
I have a static Telerik Window (always opened, can be maximized) in which the width will be re-adjusted based in the browser window. E.g. if the user resize the browser window, the telerik window width will also be re-adjusted so that the horizontal scrollbar will not appear.
Html.Telerik().Window()
.Name("Window")
.Title(" ")
.Draggable(false)
.Scrollable(true)
.Modal(false)
.Content(() =>
{%>
<% Html.RenderPartial("~/Views/Shared/Input/ucLetter.ascx", Model); %>
<%})
.Buttons(b => b.Maximize())
.Height(400)
.ClientEvents(events => events.OnLoad("WindowCoding_OnLoad"))
.Render(); %>
I have a jQuery event handler to resize the window:
function WindowCoding_OnLoad(e) {
$(this).width(getWindowWidth());
}
$(window).resize(function() {
// resize the window based on browser width
$("#Window").width(getWindowWidth());
});
Everything seems to work fine using this set up until I try to toggle the maximization of the window. As soon as I toggle it once and then I resize it, the outer window frame will be adjusted, but the window content inside stays the same without reducing or increasing the width. This leaves a very strange output in which the window frame is reduced, but all contents are all remained in their position and size.
Please see screenshot. The outer gray frame is the Default telerik window frame (we took out the title). The scrollbar is strangely remained at the original position (guess that's the window content width) although the window size is maximized.
Is there a solution to this?
Thanks
Wai Kei
I have a static Telerik Window (always opened, can be maximized) in which the width will be re-adjusted based in the browser window. E.g. if the user resize the browser window, the telerik window width will also be re-adjusted so that the horizontal scrollbar will not appear.
Html.Telerik().Window()
.Name("Window")
.Title(" ")
.Draggable(false)
.Scrollable(true)
.Modal(false)
.Content(() =>
{%>
<% Html.RenderPartial("~/Views/Shared/Input/ucLetter.ascx", Model); %>
<%})
.Buttons(b => b.Maximize())
.Height(400)
.ClientEvents(events => events.OnLoad("WindowCoding_OnLoad"))
.Render(); %>
I have a jQuery event handler to resize the window:
function WindowCoding_OnLoad(e) {
$(this).width(getWindowWidth());
}
$(window).resize(function() {
// resize the window based on browser width
$("#Window").width(getWindowWidth());
});
Everything seems to work fine using this set up until I try to toggle the maximization of the window. As soon as I toggle it once and then I resize it, the outer window frame will be adjusted, but the window content inside stays the same without reducing or increasing the width. This leaves a very strange output in which the window frame is reduced, but all contents are all remained in their position and size.
Please see screenshot. The outer gray frame is the Default telerik window frame (we took out the title). The scrollbar is strangely remained at the original position (guess that's the window content width) although the window size is maximized.
Is there a solution to this?
Thanks
Wai Kei