Hi,
I''ve got a grid control that implements the OnMouseDown event handler that checks for left click & number of clicks and then does the behavior I want. However, I''m trying to also implement a context menu when the user right clicks (to copy selected data to the clipboard). This is all fine except for the fact that, if the user selects (using the left mouse button, for example) a range of cells or rows, then uses the right mouse button to click on the selected cells to get the context menu, when the OnMouseDown event is entered, the selected cells are already changed to the item they''ve right clicked on. How can I stop this "unselecting" type of behavior? Is there some event prior to the OnMouseDown that is firing that I need to do something in?
TIA
AD
Administrator
Syncfusion Team
February 19, 2004 11:18 AM UTC
There is a property that controls this behavior of which mousebutton can select cells. Try:
this.gridControl1.Model.Options.SelectCellsMouseButtonsMask = MouseButtons.Left;
This should prevent the right button from affecting any selections.
JB
John Bowm
February 19, 2004 11:54 AM UTC
Clay,
That appears to do the trick, thanks for the help!
John