close confirm

2 posts, 1 answers
  1. possible
    possible avatar
    77 posts
    Member since:
    Oct 2006

    Posted 02 Jun 2008 Link to this post

    Hi,

    I have problem with raddock close command confirm. In code I have

    dock.OnClientCommand = "dockClose_Click";
    dock.Commands.Add(new DockCloseCommand());

    and in JS

            function dockClose_Click(dock, args)
            {
                args.set_cancel(true);
                alert('aaa');
            }

    But this doesnt work, alert shows up, but before I can click Ok on it raddock is already closed.
  2. Answer
    Sophy
    Admin
    Sophy avatar
    636 posts

    Posted 02 Jun 2008 Link to this post

    Hi Tomasz,

    The set_cancel method of the eventArgs parameter does not prevent the default response on built-in command types. It only prevents any subsequent OnClientCommand events and the server-side Command event. More information you can find in this help article. If you want to add confirmation message when clicking on close command and close the docks if the user confirms the action I suggest you use a CustomCommand and call the set_closed method in the OnClientCommand handler. You can use the RadDock's Commands online example for reference.
    If you need further assistance, do contact us again.

    Greetings,
    Sophy
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top