Close the rad window

2 posts, 0 answers
  1. vairam
    vairam avatar
    85 posts
    Member since:
    May 2008

    Posted 02 Jun 2008 Link to this post

    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?
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 02 Jun 2008 Link to this post

    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
Back to Top