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

Unset window dimension

2 Answers 234 Views
Window
This is a migrated thread and some comments may be shown as answers.
Anna
Top achievements
Rank 1
Anna asked on 07 Dec 2015, 11:26 PM

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 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Topalov
Telerik team
answered on 08 Dec 2015, 04:00 PM
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!
0
Anna
Top achievements
Rank 1
answered on 08 Dec 2015, 05:10 PM

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

Tags
Window
Asked by
Anna
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Anna
Top achievements
Rank 1
Share this question
or