Disable radwindow close button.

3 posts, 0 answers
  1. Antony
    Antony avatar
    32 posts
    Member since:
    Feb 2013

    Posted 05 Aug 2013 Link to this post

    Hi guys,

    How can I disable the close button of a RadWindow? I have a dedicated button for this and So I want to disable the default button in title bar.

    Thanks,
    Antony.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 06 Aug 2013 Link to this post

    Hi Antony,

    One option is you can use the OnClientShow event of the RadWindow to disable the close button as shown in the following code.

    JavaScript:
    <script type="text/javascript">
        function OnClientShow1(sender, args) {
            $telerik.$(".rwCloseButton", sender.get_popupElement()).attr('disabled', 'disabled');
        }
    </script>

    Another option is you can cancel the RadWindow close button click using the OnClientBeforeClose as shown below.

    JavaScript:
    <script type="text/javascript">
        function OnClientClose1(sender, args) {
            args.set_cancel(true);
        }
    </script>

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 06 Aug 2013 Link to this post

    Hi guys,

    I advise that you use the Behaviors property of the control to declare only the allowed user interactions: http://demos.telerik.com/aspnet-ajax/window/examples/behaviors/defaultcs.aspx.

    You may also find interesting the following idea and the comments right below: http://feedback.telerik.com/Project/108/Feedback/Details/37747-add-disabledbehaviors-property-for-radwindow. You can vote on the idea to raise its priority.


    Regards,
    Marin Bratanov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top