예제 #1
0
        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);
        }
예제 #2
0
        protected internal override string GetErrorText(int rowIndex)
        {
            if (DataGridView == null)
            {
                return(string.Empty);
            }

            return(DataGridView.GetRowInternal(rowIndex).ErrorText);
        }
예제 #3
0
        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));
        }