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

Minimize event

2 Answers 50 Views
Window
This is a migrated thread and some comments may be shown as answers.
iomega 55
Top achievements
Rank 1
iomega 55 asked on 26 Jul 2009, 05:15 AM
Is there any event for detecting when a window is minimized? At this moment I see events for: close, show, resize, drag, but not for minimize.

I need to know when a Window is minimized, because I need to hide it when the user cicks the minimize button.

Thanks.

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 Jul 2009, 05:31 AM
Hello,

Attach "OnClientCommand" to RadWindow/RadWindowManager and check for the CommandName in order to get the minimize event.

JavaScript:
 
<script type="text/javascript"
function OnClientCommand(sender, eventArgs) 
{     
    if(eventArgs.get_commandName() == 'Minimize'
    { 
        alert('Widnow minimized');  
        sender.hide();   // code to hide window      
    } 
</script> 

-Shinu.
0
Georgi Tunev
Telerik team
answered on 27 Jul 2009, 05:58 AM
Hello iomega,

I would also suggest to cancel the minimize command with set_cancel(true) before hiding the window in order to avoid problems with the logic at a later stage.

Kind regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Window
Asked by
iomega 55
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Georgi Tunev
Telerik team
Share this question
or