How to override the close event of radRibbonBar?

1 Answer 110 Views
Form RibbonBar
Kevin
Top achievements
Rank 1
Iron
Kevin asked on 31 Jul 2023, 12:55 AM

I want to rewrite the close event of radRibbonBar to help me achieve some other functions, but I can’t find the option of close event in the event area of radRibbonBar. I try to double-click the close event button of radRibbonBar, but it doesn’t work. I would like to ask the closing of this control. According to how to set from the event, or other ways to achieve the solution, thank you.

Best regards,

Kevin

1 Answer, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 02 Aug 2023, 01:06 PM

Hi, Kevin,

When you add a RadRibbonBar on the RadForm, the following message appears:

If you click Yes, a RadRibbonFormBehavior will be used:

https://docs.telerik.com/devtools/winforms/controls/forms-and-dialogs/ribbonform/getting-started 

You can handle the FormClosing event and execute the custom logic you need. If the close action shouldn't be performed, feel free to cancel the FormClosing event.

It is possible to access the close button directly by the radRibbonBar1.RibbonBarElement.RibbonCaption.CloseButton property and subscribe to the Click event.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
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.

Kevin
Top achievements
Rank 1
Iron
commented on 03 Aug 2023, 06:27 AM

Thank you for replying me in your busy schedule. Your answer is very helpful to me and solved my problem very well. Thank you very much.

Best regards,

Kevin

Tags
Form RibbonBar
Asked by
Kevin
Top achievements
Rank 1
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or