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

Close the rad window

1 Answer 415 Views
Window
This is a migrated thread and some comments may be shown as answers.
vairam
Top achievements
Rank 1
vairam asked on 02 Jun 2008, 05:09 AM
Hi

I need the close (behavior) button in the top of the rad window .But when the user click the close button no action need to be perform.That means user can not be close the window using this close button.How can i do that one?

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 02 Jun 2008, 06:54 AM
Hello vairam,

Here is how to override the closing function and prevent the closing of the window:
<form id="form1" runat="server"
    <asp:ScriptManager ID="ScriptManager1" runat="server"
    </asp:ScriptManager> 
    <script type="text/javascript"
        function openWin() 
        { 
            radopen("about:blank",null); 
        } 
    </script> 
    <telerik:RadWindowManager  
 
     
    ID="RadWindowManager1" runat="server"
    </telerik:RadWindowManager> 
     
    <script> 
     
     
    TelerikTelerik.Web.UI.RadWindow.prototype.old_close = Telerik.Web.UI.RadWindow.prototype.close; 
     
    Telerik.Web.UI.RadWindow.prototype.close = function(e) 
    { 
         //Override close 
    }                                
    </script> 
     
    <button onclick="openWin(); return false;"
        test</button> 
</form> 

Another option of course is to remove the Close button from the RadWindow by using the Behaviors property.


Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Window
Asked by
vairam
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or