Unset window dimension

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

    Posted 07 Dec 2015 Link to this post

    Hi,

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

     E.g. 

    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
    Admin
    Dimiter Topalov avatar
    356 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:

    kendoWindowObject.setOptions({
      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.

    Regards,
    Dimiter Topalov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Anna
    Anna avatar
    36 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.

     

    Best,

    Ama

Back to Top