The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator 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.
JBJohn BowmFebruary 19, 2004 11:54 AM UTC
Clay,
That appears to do the trick, thanks for the help!
John