We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SelectCellsMouseButtonsMask

Hi, Is there an equivalent to the SelectCellsMouseButtonsMask property like in the regular grid control for the GridGroupingControl or should I handle the mouse events specifically?? Jason Southgate.

3 Replies

JS Jason Southgate December 28, 2004 02:05 AM

Basically I am already using linkMonitorGrid.TableControl.Model.Options.SelectCellsMouseButtonsMask = MouseButtons.Left; to stop the row being unselected when the context menu pops up, but I would like to allow the TableControlCellClick event to still fire when right-clicking the GroupingGridControl. Many thanks.


AD Administrator Syncfusion Team December 29, 2004 03:52 AM

TableCellClick will not be raised on the right-click if you set the SelectCellsMouseButtonsMask to ignore it. You can try to catch the TableControlMouseDown which will be raised for the right click even if you set the selections to ignore the right-click. If you are using the new row selection support in 3.0, another option might be to not set the SelectCellsMouseButtonsMask, but instead handle the SelectedRecordsChanging event and cancel it if the selections are changing as a result of a right-click. private void grd_SelectedRecordsChanging(object sender, SelectedRecordsChangedEventArgs e) { if(Control.MouseButtons == MouseButtons.Right) e.Cancel = true; }


JS Jason Southgate December 29, 2004 04:44 AM

Hi Clay, Well we are not using 3.0 yet, so I''ll take the first approach! I can see the later method is conceptually clearer however. Thanks again. Jason.

Loader.
Live Chat Icon For mobile
Up arrow icon