public Rectangle RowRect(int row)
{
if (this.TableModel == null || this.ColumnModel == null || row == -1 || row > this.TableModel.Rows.Count)
return Rectangle.Empty;
Rectangle rect = new Rectangle();
rect.X = this.DisplayRectangleLeft;
if (this.EnableWordWrap)
{
rect.Y = this.BorderWidth + RowIndexToClient(row);
rect.Height = this.TableModel.Rows[row].Height;
}
else
{
rect.Y = this.BorderWidth + ((row - this.TopIndex) * this.RowHeight);
rect.Height = this.RowHeight;
}
rect.Width = this.ColumnModel.VisibleColumnsWidth;
if (this.HeaderStyle != ColumnHeaderStyle.None)
rect.Y += this.HeaderHeight;
return rect;
}