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

[Solved] RichTextBox and ContextMenu on parent control

2 Answers 101 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Anatoly Chekh
Top achievements
Rank 1
Anatoly Chekh asked on 28 Jul 2011, 02:03 PM
Hello!

I have a question.
We have control (i.e. grid).
In grid we have many children. One of them is rich text box.
We add context menu to the hole grid.
But when we try to open it on the rich text box - it's not opened.

But this is work with the Telerik Q1.

How can I do this with Q2?

Thans, Anatoly Chekh.

2 Answers, 1 is accepted

Sort by
0
Accepted
Andrew
Telerik team
answered on 03 Aug 2011, 02:12 PM
Hi Anatoly Chekh,

As you have not described the approach you have used to implement your custom menu, I suggest you set e.Handled=true on MouseRightButtonDown event and then show your custom context menu on MouseRightButtonUp(or at least this is the most common way to do it). In this case our editor handles both events and they can't bubble up to your Grid and thus stopping the context menu from showing. To prevent that, set IsSelectionMiniToolBarEnabled and IsContextMenuEnabled properties to false. This way those events won't be handled and your context menu should have no problem showing.
If this doesn't help, feel free to contact us again.

Kind regards,
Andrew
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Anatoly Chekh
Top achievements
Rank 1
answered on 03 Aug 2011, 02:24 PM
Thanks a lot. This works!
Tags
RichTextBox
Asked by
Anatoly Chekh
Top achievements
Rank 1
Answers by
Andrew
Telerik team
Anatoly Chekh
Top achievements
Rank 1
Share this question
or