JS
Jason Southgate
December 28, 2004 07:05 AM UTC
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 08:52 AM UTC
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 09:44 AM UTC
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.