Hi there,
In order to define the window size when it is maximized I'm setting its style as follows:
div.radwindow_ModalWin.maximizedwindow
{
The problem is that the actual radwindow implementation overrides it with:
{
height:100% !important;
The question is: is there any way to define window size when it is maximized?
Thanks,
Paulo
4 Answers, 1 is accepted
Just a little update. At the moment I am doing it as follows:
function show(url)
{
var w = window.radopen(url, 'commonPopup');
w.isInMaxMode = false;
w.onCommand = function(which)
{
if (which = "Maximize" )
{
this.isInMaxMode = !this.isInMaxMode;
if ( !this.isInMaxMode )
{
//'normalize'
Telerik.Web.CommonScripts.removeCssClasses(this._popupElement,["almostmaximizedwindow"]);
return(false);
}
else
{
//'maximize'
Telerik.Web.DomElement.addCssClass(this._popupElement,"almostmaximizedwindow");
return(false);
}
}
else
{
return(true);
}
}
}
It works but I think it is a bit clumsy. So... my question remains: is there a more elegant way to achieve this?
Thanks,
Paulo
You can define custom maximize size using JavaScript but not when its state is "maximized", because the custom width will not be considered. I have prepared and attached one sample project regarding the issue. Please give it a try and in case of more questions do not hesitate to ask.
Best wishes,
George
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I tried the code from attachment above. I manage to set the custome size. But i got one problem which is when i wish to restore back the previous size, i unable to do it. Bcos the resize screen only have miximize button and minimize button.
Can anyone help?
Regards,
Bryan Tan
The easiest way to set a custom size to a RadWindow when it is maximized, is to change the rwMaximizedWindow css class as it shown in the following code.
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
id
=
"Head1"
runat
=
"server"
>
<
title
>Untitled Page</
title
>
<
style
type
=
"text/css"
>
.rwMaximizedWindow
{
width: 600px !important;
height: 600px !important;
}
</
style
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
>
</
asp:ScriptManager
>
<
telerik:RadWindowManager
ID
=
"RadWindowManager1"
runat
=
"server"
>
<
Windows
>
<
telerik:RadWindow
ID
=
"RadWindow1"
Height
=
"370px"
width
=
"395px"
runat
=
"server"
VisibleOnPageLoad
=
"true"
>
</
telerik:RadWindow
>
</
Windows
>
</
telerik:RadWindowManager
>
</
div
>
</
form
>
</
body
>
</
html
>
Sincerely yours,
Petio Petkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.