This is a migrated thread and some comments may be shown as answers.

[Solved] Window Opens Collapsed

1 Answer 6 Views
Window
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hugh Cumper
Top achievements
Rank 1
Hugh Cumper asked on 21 Oct 2011, 01:40 PM
When I open a modal window it is first displayed in a collapsed state just big enough to hold the x to close it. As soon as I start to resize it with the mouse it displays correctly and thereafter it is always correct when I display it again. The window is created with

  Html.Telerik().Window()
        .Name("AddFavorites")
        .Title("Add Favorite")
        .Draggable(true)
        .Resizable(resizing => resizing.Enabled(true)
            .MinHeight(180)
            .MinWidth(300)
            .MaxHeight(500)
            .MaxWidth(500)
        )
        .Visible(false)
        .Modal(true)
        .Buttons(b => b.Close())
        .Content(
  @<text>...

and opened with

        $('#AddFavorites').data('tWindow').center();.open();;
        $('#AddFavorites').data('tWindow').modal = true;

How can I get the window to display correctly the first time?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 21 Oct 2011, 04:07 PM
Hi Hugh,

The min/max dimensions set in the Window Resizable() settings are taken into account during resizing. Initially the Window sizes automatically, according to its content. If you want to change this behavior, please set Width() and Height() to some values within the allowed range.

Greetings,
Dimo
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Window
Asked by
Hugh Cumper
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or