ContextMenu close event

1 Answer 69 Views
ContextMenu
Nikolas
Top achievements
Rank 2
Iron
Iron
Nikolas asked on 09 Jan 2023, 10:32 AM

Hello,

Is there a way to capture when the contextmenu is closed? 

If user presses one action or just clicks outside the menu.

Either a method or an event.

Thanks

1 Answer, 1 is accepted

Sort by
1
Accepted
Dimo
Telerik team
answered on 12 Jan 2023, 08:29 AM

Hi Nikolas,

If the user clicks on a ContextMenu item, the app will know about this in the ContextMenu's OnClick event.

On the other hand, currently there is no built-in way to know when the user hits Escape or clicks outside the ContextMenu. There is a public feature request for ContextMenu OnHide event with an example - you will need click and keydown handlers on the documentElement. From these handlers, notify the .NET runtime that the ContextMenu has closed.

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
ContextMenu
Asked by
Nikolas
Top achievements
Rank 2
Iron
Iron
Answers by
Dimo
Telerik team
Share this question
or