Here is one solution that worked for me.
private void button1_Click(object sender, System.EventArgs e)
{
GridRangeInfoList rangeList = this.gridControl1.Selections.GetSelectedRows(true, false);
this.gridControl1.BeginUpdate();
for(int row = 1; row <= this.gridControl1.RowCount; ++row)
{
GridRangeInfo range = GridRangeInfo.Row(row);
if(rangeList.AnyRangeContains(range))
{
this.gridControl1.Selections.Remove(range);
}
else
{
this.gridControl1.Selections.Add(range);
}
}
this.gridControl1.EndUpdate();
this.gridControl1.Refresh();
}