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 would like to be able to select cells with either the left or right mouse button. If however, the user clicks with the right mouse button on a cell that is already part of a selection, I don''t want the selection to change.
The SelectionChanging(...) method does not let you know which mousebutton was used to trigger the selection change, so I couldn''t cancel the change there. I thought perhaps I would trap the MouseDown(...) event before SelectionChanging(...) occurred to get which button was pressed, but for some strange reason, apparently the SelectionChanging(...) method occurs before the MouseDown(...) event. That seems particularly odd to me.
In any case, how would you suggest finding out which button was used to change the selection, before the selection actually changes at all, so that it can be cancelled if necessary?
Thanks
ADAdministrator Syncfusion Team October 1, 2005 03:46 AM UTC
You can use Control.MouseButtons to test what mouse button is depressed in SelectionsChanging. This thread has a sample. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=32170