Right mouse click on DataGridTextColumn when editing.

Dec 18, 2008 at 1:14 AM
I'd like to create a custom context menu to be used in Edit mode.
But when I right click on any text in edit mode, it exits edit mode and select the cell that I was editing.
How can I do this? I am very new to WPF, any help would be very appreciated.


Dec 18, 2008 at 9:09 PM
This appears to be a bug. Normally, the cells will exit edit mode when it loses focus. ContextMenus receive focus when they open, which is why the cell lost focus and exited edit mode. However, this should probably be special cased and allowed to happen. I will file a bug. Unfortunately, I'm not sure there is a workaround.
Dec 19, 2008 at 12:04 AM
First of all, thank you for the reply. Hmm. this is weired. Because when I make DataGridTemplateColumn and use richtextbox for displaying and editing. Then I have no problem with context menu. Maybe because there's no difference between display mode and edit mode for DataGridTemplateColumn...