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

close confirm

1 Answer 96 Views
Dock
This is a migrated thread and some comments may be shown as answers.
possible
Top achievements
Rank 1
possible asked on 02 Jun 2008, 08:03 AM
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.

1 Answer, 1 is accepted

Sort by
0
Accepted
Sophy
Telerik team
answered on 02 Jun 2008, 09:39 AM
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
Tags
Dock
Asked by
possible
Top achievements
Rank 1
Answers by
Sophy
Telerik team
Share this question
or