Currently, I think you will have to handle 2 events to catch both these situations. The grid.TableControl.MouseUp will catch the click where there are no cells.
this.gridGroupingControl1.TableControlCellMouseUp += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCellMouseEventHandler(gridGroupingControl1_TableControlCellMouseUp);
this.gridGroupingControl1.TableControl.MouseUp += new MouseEventHandler(TableControl_MouseUp);
private bool TableControlCellMouseUpHit = false;
private void gridGroupingControl1_TableControlCellMouseUp(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCellMouseEventArgs e)
{
if(e.Inner.MouseEventArgs.Button == MouseButtons.Right)
{
TableControlCellMouseUpHit = true;
this.contextMenu1.Show(this.gridGroupingControl1,
this.gridGroupingControl1.PointToClient(Control.MousePosition));
}
}
private void TableControl_MouseUp(object sender, MouseEventArgs e)
{
if(!TableControlCellMouseUpHit && e.Button == MouseButtons.Right)
this.contextMenu1.Show(this.gridGroupingControl1,
this.gridGroupingControl1.PointToClient(Control.MousePosition));
TableControlCellMouseUpHit = false;
}