In a ultragrid when the cursor is placed inside a cell, on pressing the right mouse button, a standard contextmenu
containing items like "open IME", cut, copy, paste is displayed.
Is there a possibility to suppress that kind of menu in order to replaced it by a customized menu ?
like e.DisplayPromptMsg = false in the handler BeforeRowDeleted ? in order to suppress the standard delete confirmation dialog ??
You can set the ContextMenu property on the grid just like on any other control and your ContextMenu will replace the default one.
Hi Mike,
thanks for your suggestions. Unfortunately in the case of this contextmenu
(contains items: cancel,-, cut, copy, past, delete,-, select all, open IME)
it doesn't work. It seems to be a Windows XP menu.I tried to trace exactly what happened with spy++ there I can see that on pushing the right mouse buttonover der activated cell a WM_MOUSEACTIVATE event is fired.
But even when I override the WndProc handler no handler is called before the contextmenu is displayed.
protected override void WndProc(ref Message m) { //etc. if (m.Msg == WM_MOUSEACTIVATE) MessageBox.Show("test"); } No idea where I can suppress this menu?