We have been using a RadGrid "classic" with AllowMultiRowSelection enabled and EnableDragToSelectRows enabled. On this page, we also display a context menu. If the user right-clicks while over the grid (to launch the context window), he/she can easily accidentally end up selecting rows in the grid at the same time. To deal with this, we have been using an onMouseDown handler which cancels the mouse down event if it is triggered by a right-click.
However, with RadGrid "prometheus", this no longer works. No matter what, the selection drag begins. This is quite a "drag" -- I want to allow drag-to-select only with a left-button click, so that right-clicks will be exclusively available for displaying my context menu.
Is there some grid setting, or other workaround, by which I can prevent right-click drag-to-select? I tried to leverage the OnRowContextMenu handler, but that gets called after-the-fact.
:(
<script type="text/javascript"> |
function OnMouseDown(e) |
{ |
// To protect the context menu, kill right-click drag'n'select |
// by stopping the mouse-down event if the right button is |
// the one triggering it. Context menus are launched by the |
// mouse-up event. Hooray. |
if ( e.button == 2 ) |
{ |
e.cancelBubble = true; |
e.returnValue = false; |
return false; |
} |
} |
</script> |
However, with RadGrid "prometheus", this no longer works. No matter what, the selection drag begins. This is quite a "drag" -- I want to allow drag-to-select only with a left-button click, so that right-clicks will be exclusively available for displaying my context menu.
Is there some grid setting, or other workaround, by which I can prevent right-click drag-to-select? I tried to leverage the OnRowContextMenu handler, but that gets called after-the-fact.
:(