This may be an issue with the way the Silverlight 3 DataGrid captures mouse events, but I'm looking for a work-around if possible.
When I hook up the RadContextMenu to a Silverlight 3 DataGrid control, if the user right-clicks on a row, the context menu displays correctly, and I am able to detect the row that was clicked on.
However, I also want this to work on the Mac. The right-click equivalent on a Mac (Ctrl-LeftMouseClick) does not display the RadContextMenu -- it displays the Silverlight context menu. Therefore, I intended to detect the platform the user was running on and if it was a Mac, I would set the key sequence for the RadContextMenu to (Alt-LeftMouseClick), since (Ctrl-LeftMouseClick) doesn't work.
I tried setting the EventName to "MouseLeftButtonDown" and the Modifier Key to ModifierKeys.Alt, but it did not work. I tried dropping the ModifierKeys value, and it still did not work. After much experimentation, I discovered that the "MouseLeftButtonDown" EventName does not display the ContextMenu on a Silverlight 3 DataGrid, whether on the Mac or on Windows. Somehow the left-mouse-button-click event gets captured by the DataGrid, and never reaches the Telerik RadContextMenu control.
Any ideas on how to solve this? The bottom line is that I need a way to display a context menu for the DataGrid on a Mac.
When I hook up the RadContextMenu to a Silverlight 3 DataGrid control, if the user right-clicks on a row, the context menu displays correctly, and I am able to detect the row that was clicked on.
However, I also want this to work on the Mac. The right-click equivalent on a Mac (Ctrl-LeftMouseClick) does not display the RadContextMenu -- it displays the Silverlight context menu. Therefore, I intended to detect the platform the user was running on and if it was a Mac, I would set the key sequence for the RadContextMenu to (Alt-LeftMouseClick), since (Ctrl-LeftMouseClick) doesn't work.
I tried setting the EventName to "MouseLeftButtonDown" and the Modifier Key to ModifierKeys.Alt, but it did not work. I tried dropping the ModifierKeys value, and it still did not work. After much experimentation, I discovered that the "MouseLeftButtonDown" EventName does not display the ContextMenu on a Silverlight 3 DataGrid, whether on the Mac or on Windows. Somehow the left-mouse-button-click event gets captured by the DataGrid, and never reaches the Telerik RadContextMenu control.
Any ideas on how to solve this? The bottom line is that I need a way to display a context menu for the DataGrid on a Mac.