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

Documentation flaw

6 Answers 245 Views
Window
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 14 Feb 2012, 11:12 PM
Hi,

the configuration tab lists minHeight and minWidth as parameters, yet the examples for the kendoWindow implementation use height and width as parameters.  Can you please confirm which ones to use?

6 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 15 Feb 2012, 08:44 AM
Hi David,

Parameters height and width are used to set initial metrics of the window.
minHeight and minWidth can be used to define the minimum size that the window can have after resizing.
You can use both of them:
window.kendoWindow({
    width: "500px",
    height: "600px",
    minWidth: 300,
    minHeight: 300,
    title: "Kendo Window",
    close: onClose
});


Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
David
Top achievements
Rank 1
answered on 15 Feb 2012, 10:21 AM
Okay - would be nice if you could update the documentation on that :)

Also - I'm still confused.  When I started using the control, I noticed that the height was automatically set to the height of the html loaded through ajax, but I have never been able to re-simulate this.  How can we have the window automatically size to the height of the content we load?

I think the iframes are a real pain and should be avoided to be honest.
0
Alex Gyoshev
Telerik team
answered on 16 Feb 2012, 01:24 PM
> How can we have the window automatically size to the height of the content we load? 
Assuming that you are not loading your content in an iframe, you can simply remove the width/height of the window that you want to auto-resize. Usually, the most useful approach is to have a fixed width and set the window height:

$(".k-window").height("");

All the best,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
David
Top achievements
Rank 1
answered on 16 Feb 2012, 02:43 PM
Hi,

I think that the cause was that it was creating an iframe because we included the http:// address in the url.  Even though it was within the same domain (and to my personal opinion, should not be treated as a cross-domain request), it creates iframes every time.  Removing the http://domain.com prefix fixes the issue.

However - for different reasons (we sometimes do need to change domain), our url rewrite engine ALWAYS prefixes the http://domain.com part in the urls.  I think you should change the check so that it does better validate whether a URL is cross-domain or not.

We didn't link this behaviour to our recent fix (we recently noticed that some urls were not being rewritten by the engine yet, and fixed that problem), but now we have - thanks!
0
Alex Gyoshev
Telerik team
answered on 17 Feb 2012, 08:46 AM
> I think you should change the check so that it does better validate whether a URL is cross-domain or not. 
Indeed, as discussed in the other thread, we will. Until then, use the iframe configuration option.

Regards,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Ravi
Top achievements
Rank 1
answered on 10 Aug 2012, 02:51 PM
Are MinHeight() and MinWidth() exposed in the Html.Kendo().Window() HTML helper method?

[Edit]
NM: Figured it out: .Resizable (p => p.MinWidth(300).MinHeight(15))
Waiting for the Kendo UI MVC docs to contain exhaustive API documentation and more how-to use cases.  The controls look good but the lack of documentation is beginning to be a show-stopper.  :(
[/Edit]

Thanks,

--Ravi

Tags
Window
Asked by
David
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
David
Top achievements
Rank 1
Alex Gyoshev
Telerik team
Ravi
Top achievements
Rank 1
Share this question
or