Unset window dimension

3 posts, 1 answers
  1. Anna
    Anna avatar
    64 posts
    Member since:
    Jul 2015

    Posted 07 Dec 2015 Link to this post


    I have a kendo window that's reused. How do I unset the dimensions of the window after I set the width and height? 


    Btn1 open window with width: 400px & height: 400px;

    Btn2 open same window with dynamic content, expect window to resize according to content.


    If I click on Btn1, and then Btn2. How can I set the windowOptions that the window will open resize according to the content size now? I tried to set width and height to null, undefined, empty string (""), even "auto". None worked.


  2. Answer
    Dimiter Topalov
    Dimiter Topalov avatar
    1266 posts

    Posted 08 Dec 2015 Link to this post

    Hello Ama,

    The dimensions, as well as other Kendo UI Window options, can be reconfigured by using the setOptions property.

    In the case of width and height properties, you can use the following code to reset them:

      width: null,
      height: null

    The Window is currently not designed to properly support this scenario, that's why you will also need to remove the width (and height) of the Window wrapper:

    kendoWindowObject.wrapper.css("width", "");

    Hope this helps.

    Dimiter Topalov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Anna
    Anna avatar
    64 posts
    Member since:
    Jul 2015

    Posted 08 Dec 2015 in reply to Dimiter Topalov Link to this post

    I see. That's a bit unfortunate to hear. We use angular as main framework, and as you know manipulating JQuery is generally not encouraged. I hope to see in the future versions, the width and height properties can be reset like other Kendo widgets.




Back to Top