Is there any way to set the Window size based on a css class? I would like the window to resize to the div tag inside or be able to attach the CSS class to the Window to set the size. I tried the CSSClass property on the WindowManager and saw no effect.
Any advice?
Any advice?
4 Answers, 1 is accepted
0
Hi Garry,
In general you can use the radwindow's basic class (.radwindow) and to set the needed size there with the !important clause, however I am not quite sure if this will help in this case.
I suggest to check the following KB article that shows how to resize the RadWindow control based on its content - its for RadWindow for ASP.NET, but you can use the code as a base and extend it further to fit your requirements:
http://www.telerik.com/support/kb/article/b454K-gtc-b454T-a-b454c-a.aspx
By the way we are working on a serverside property which will automatically resize the RadWindow based on the content page - it will appear in one of the future versions of the control.
Sincerely yours,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
In general you can use the radwindow's basic class (.radwindow) and to set the needed size there with the !important clause, however I am not quite sure if this will help in this case.
I suggest to check the following KB article that shows how to resize the RadWindow control based on its content - its for RadWindow for ASP.NET, but you can use the code as a base and extend it further to fit your requirements:
http://www.telerik.com/support/kb/article/b454K-gtc-b454T-a-b454c-a.aspx
By the way we are working on a serverside property which will automatically resize the RadWindow based on the content page - it will appear in one of the future versions of the control.
Sincerely yours,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Garry
Top achievements
Rank 1
answered on 24 Jun 2008, 01:58 PM
Thank you as always George.
Yes having the RadWindow resize to its content is exactly what I am after. I want to be able to set widths/heights through CSS and not have to touch the RadWindow properties.
Please let us all know when this functionality becomes available!
Yes having the RadWindow resize to its content is exactly what I am after. I want to be able to set widths/heights through CSS and not have to touch the RadWindow properties.
Please let us all know when this functionality becomes available!
0
Sure thing Garry,
Once we start working on this and have results, we will show the beta. Please note however, that such property would only work for local files only - e.g. if you try to resize the window based on the content of a page that is external to your server (Google for example), this will not work due to the browser's security mechanism.
All the best,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Once we start working on this and have results, we will show the beta. Please note however, that such property would only work for local files only - e.g. if you try to resize the window based on the content of a page that is external to your server (Google for example), this will not work due to the browser's security mechanism.
All the best,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Garry
Top achievements
Rank 1
answered on 24 Jun 2008, 02:27 PM
Yeah I got that from the KB article, which by the way was very helpful. I have implemented the client side scripts and I am getting not perfect, but acceptable results.
Reason I wanted/want this functionality is because I am loading various user controls into RadWindow and based on the status of the user control, edit mode, view mode, etc..., different forms with different widths get displayed. Everything worked fine, but setting the RadWindow to the max width to accomodate the larger edit forms looked horrible on some of the smaller width modes, such as listing mode.
Thanks again and keep up the good work!
Reason I wanted/want this functionality is because I am loading various user controls into RadWindow and based on the status of the user control, edit mode, view mode, etc..., different forms with different widths get displayed. Everything worked fine, but setting the RadWindow to the max width to accomodate the larger edit forms looked horrible on some of the smaller width modes, such as listing mode.
Thanks again and keep up the good work!