I think moving the CurrentRecordManager.CancelEdit code from your cancel button handler to the gridGroupingControl Leave event will allow the cancel to work in this case as well as the previous case.
private void cancel_Click(object sender, System.EventArgs e)
{
this.Close();
}
private void gridGroupingControl1_Leave(object sender, System.EventArgs e)
{
if(this.cancel.Bounds.Contains(this.PointToClient(Control.MousePosition))
&& Control.MouseButtons == MouseButtons.Left)
{
if (this.gridGroupingControl1.Table.CurrentRecordManager.IsEditing)
{
this.gridGroupingControl1.Table.CurrentRecordManager.CancelEdit();
}
}
}