How to adjust the size of the telerik window dynamically?
I have question about Telerik win开发者_运维问答dow.
Нow can I adjust the size of the window to content when window has already been shown?
You can use jQuery to size the window:
$("#window").width(100).height(100);
Set up a client event for the onActivate function, and run the following jQuery code.
function onActivate(e) {
$("#window .t-content").css("height", $("#content").height());
}
$("#content")
is content the window displays.
Have you tried calling RadWindow
's autoSize()
method on your window?
http://www.telerik.com/help/aspnet-ajax/window_programmingradwindowmethods.html
According the the documentation, autoSize()
is described as: "Changes RadWindow's size to fit the content page. It cannot be used with pages from other domains due to browsers' security restrictions. You can optionally call the method with argument true - this will make the autosizing perform an animation while adjusting the size"
Or if you are using a RadWindowManager
, setting the AutoSize
property to true? I'm pretty sure setting this to true will cause any window created through the RadWindowManager
to be auto-sized based on the content.
精彩评论