Henrique Duarte
Top achievements
Rank 1
Veteran
Henrique Duarte
asked on 16 Sep 2008, 02:44 PM
Hi,
How can I open a window miximized, with TitleBar but showing only the close button?
I tried to set InitialBehavior=Maximize and Behavior=Close, but the window opens with normal size.
Regards,
Henrique
How can I open a window miximized, with TitleBar but showing only the close button?
I tried to set InitialBehavior=Maximize and Behavior=Close, but the window opens with normal size.
Regards,
Henrique
6 Answers, 1 is accepted
0
Hi Henrique,
You need to allow both actions in the InitialBehaviors / Behaviors property for this to work:
Best wishes,
Georgi Tunev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You need to allow both actions in the InitialBehaviors / Behaviors property for this to work:
<telerik:RadWindow VisibleOnPageLoad="true" ID="RadWindow1" runat="server" |
InitialBehaviors="Close,Maximize" |
Behaviors="Close, Maximize"> |
</telerik:RadWindow> |
Best wishes,
Georgi Tunev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Henrique Duarte
Top achievements
Rank 1
answered on 25 Sep 2008, 11:12 AM
Hi Georgi,
How can I show only the close button on titlebar?
Regards,
Henrique
How can I show only the close button on titlebar?
Regards,
Henrique
0
Serrin
Top achievements
Rank 1
answered on 25 Sep 2008, 02:24 PM
That is kinda weird, I can't get any combination of settings to start it maximized but to only have a close button... and that'll be kinda useful for something I'm planning to work on down the road. I even tried using the GetRadWindow() js code from another example and then using set_behaviors to set it to just close, but that doesn't produce the desired result. :(
Is there a way to do this with javascript?
Is there a way to do this with javascript?
0
Hi,
The current implementation of RadWindow works like this - if a Behavior is not specified in the Behaviors enum, it is disabled.
What does it mean in practical terms?
If you specify Behaviors = "Close", then maximize functionality is disabled, so the window would not respect the InitialBehaviors = Maximize (or calling this from javascript for that matter).
We recognize that changing this behavior to discriminate between what is allowed to the user, and what is allowed to the developer (e.g. from code) would be a better an more flexible. This has been logged for improvement and in the future you will be able to implement the desired behavior declaratively and without hacks.
For the time being, however, in order for the maximize method to work, Maximize behavior should be explicitly enabled.
Greetings,
Tervel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
The current implementation of RadWindow works like this - if a Behavior is not specified in the Behaviors enum, it is disabled.
What does it mean in practical terms?
If you specify Behaviors = "Close", then maximize functionality is disabled, so the window would not respect the InitialBehaviors = Maximize (or calling this from javascript for that matter).
We recognize that changing this behavior to discriminate between what is allowed to the user, and what is allowed to the developer (e.g. from code) would be a better an more flexible. This has been logged for improvement and in the future you will be able to implement the desired behavior declaratively and without hacks.
For the time being, however, in order for the maximize method to work, Maximize behavior should be explicitly enabled.
Greetings,
Tervel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Serrin
Top achievements
Rank 1
answered on 26 Sep 2008, 12:49 PM
Hi Tervel,
Thanks for letting us know! I definitely look forward to being able to use it like that in the future.
But for now... is it possible to catch the user clicking the maximize button and to cancel the request (like if you used a button to launch script but cancelled the click response, like returning false for Maximize_onClick or something similar )?
Thanks for letting us know! I definitely look forward to being able to use it like that in the future.
But for now... is it possible to catch the user clicking the maximize button and to cancel the request (like if you used a button to launch script but cancelled the click response, like returning false for Maximize_onClick or something similar )?
0
Accepted
Hi Serrin,
If I understand you correctly, you wish nothing to happen when the user clicks on the Restore button of the maximized RadWindow, am I right? If this is so, yes, it is possible to override the Restore button's functionality:
Sincerely yours,
Georgi Tunev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
If I understand you correctly, you wish nothing to happen when the user clicks on the Restore button of the maximized RadWindow, am I right? If this is so, yes, it is possible to override the Restore button's functionality:
<form id="form1" runat="server"> |
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
</telerik:RadScriptManager> |
<telerik:RadWindow VisibleOnPageLoad="true" ID="RadWindow1" runat="server" InitialBehaviors="Close,Maximize" |
Behaviors="Close, Maximize"> |
</telerik:RadWindow> |
<script type="text/javascript"> |
Telerik.Web.UI.RadWindow.prototype.oldRestore = Telerik.Web.UI.RadWindow.prototype.restore; |
Telerik.Web.UI.RadWindow.prototype.restore = function() |
{ |
//if you want to call the restore() function, use |
//this.oldRestore(); |
} |
</script> |
</form> |
Sincerely yours,
Georgi Tunev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.