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); }
protected internal override string GetErrorText(int rowIndex) { if (DataGridView == null) { return(string.Empty); } return(DataGridView.GetRowInternal(rowIndex).ErrorText); }
protected override Rectangle_ GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) { if (DataGridView == null || string.IsNullOrEmpty(DataGridView.GetRowInternal(rowIndex).ErrorText)) { return(Rectangle_.Empty); } Size_ error_icon = new Size_(12, 11); return(new Rectangle_(new Point_(Size.Width - error_icon.Width - 5, (Size.Height - error_icon.Height) / 2), error_icon)); }