public void PaintCells(Rectangle clipBounds, DataGridViewPaintParts paintParts) { if (rowIndex < 0 || rowIndex >= dataGridView.Rows.Count) { throw new InvalidOperationException("Invalid RowIndex."); } DataGridViewRow row = dataGridView.GetRowInternal(rowIndex); row.PaintCells(graphics, clipBounds, rowBounds, rowIndex, rowState, isFirstDisplayedRow, isLastVisibleRow, paintParts); }
public void DrawFocus(Rectangle bounds, bool cellsPaintSelectionBackground) { if (rowIndex < 0 || rowIndex >= dataGridView.Rows.Count) { throw new InvalidOperationException("Invalid RowIndex."); } DataGridViewRow row = dataGridView.GetRowInternal(rowIndex); row.PaintCells(graphics, clipBounds, bounds, rowIndex, rowState, isFirstDisplayedRow, isLastVisibleRow, DataGridViewPaintParts.Focus); }