protected internal virtual void OnCellRemoved(RowEventArgs e)
{
if (this.CanRaiseEvents)
{
this.InvalidateRow(e.Index);
if (CellRemoved != null)
{
CellRemoved(this, e);
}
if (e.CellFromIndex == -1 && e.CellToIndex == -1)
{
if (this.FocusedCell.Row == e.Index)
{
this.focusedCell = CellPos.Empty;
}
}
else
{
for (int i = e.CellFromIndex; i <= e.CellToIndex; i++)
{
if (this.FocusedCell.Row == e.Index && this.FocusedCell.Column == i)
{
this.focusedCell = CellPos.Empty;
break;
}
}
}
}
}