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

[Solved] ContextMenu not closing after cancel

1 Answer 138 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Tony Steele
Top achievements
Rank 1
Tony Steele asked on 27 Feb 2008, 05:21 PM
To confirm a delete menu item i set the following function on the OnClientContextMenuItemClicking event.

        function TreeMenuClick(sender, eventArgs){
            if (eventArgs.get_menuItem().get_value() == "Delete") {
                if (!confirm("Do you want to delete the selected Item?")) {
                    eventArgs.set_cancel(true);
                }
            }
        }

When cancel is selected in the confirm dialog the context menu remains displayed. I tried the following command, but it did not make any difference.

                    eventArgs.get_menuItem().get_menu().close();
Any idea how you get the menu to close.

1 Answer, 1 is accepted

Sort by
0
Erjan Gavalji
Telerik team
answered on 28 Feb 2008, 08:15 AM
Hi Tony,

You should use the hide() method of the RadContextMenu object.

Best,
Erjan Gavalji
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
TreeView
Asked by
Tony Steele
Top achievements
Rank 1
Answers by
Erjan Gavalji
Telerik team
Share this question
or