+2008-05-21 Jonathan Pobst <monkey@jpobst.com>
+
+ * DataGridView.cs: Only paint the top left header cell if there
+ are columns.
+
2008-05-21 Jonathan Pobst <monkey@jpobst.com>
* DataGridView.cs: When binding to a BindingSource, get the underlying
bounds.Inflate (-BorderWidth, -BorderWidth);
// Paint the top left cell
- if (rowHeadersVisible && columnHeadersVisible) {
+ if (rowHeadersVisible && columnHeadersVisible && ColumnCount > 0) {
Rectangle topleftbounds = new Rectangle (bounds.X, bounds.Y, rowHeadersWidth, columnHeadersHeight);
TopLeftHeaderCell.PaintWork (g, e.ClipRectangle, topleftbounds, -1, TopLeftHeaderCell.State, ColumnHeadersDefaultCellStyle, AdvancedColumnHeadersBorderStyle, DataGridViewPaintParts.All);