public int RowIndexAt(int x, int y) { if (this.TableModel == null) { return -1; } if (this.HeaderStyle != ColumnHeaderStyle.None) { y -= this.HeaderHeight; } y -= this.BorderWidth; if (y < 0) { return -1; } if (this.VScroll) { y += this.VScrollOffset(); } return this.TableModel.RowIndexAt(y); }