Class DataGridViewExComboBoxCell
- Namespace
- ExControls
- Assembly
- ExControls.dll
DataGridView cell with a combo box that can be drawn in the custom style with the state colors of ExComboBoxStyle like ExComboBox.
public class DataGridViewExComboBoxCell : DataGridViewComboBoxCell, ICloneable, IDisposable
- Inheritance
-
DataGridViewExComboBoxCell
- Implements
- Inherited Members
Constructors
DataGridViewExComboBoxCell()
Initializes a new instance of the DataGridViewExComboBoxCell class in the default style.
public DataGridViewExComboBoxCell()
Properties
DefaultStyle
Default style of the Control
public bool DefaultStyle { get; set; }
Property Value
DropDownBackColor
Color of the selected row in drop down menu
public Color DropDownBackColor { get; set; }
Property Value
DropDownSelectedBackColor
Color of the selected row in drop down menu
public Color DropDownSelectedBackColor { get; set; }
Property Value
EditType
Gets the type of the cell's hosted editing control.
public override Type EditType { get; }
Property Value
- Type
The Type of the underlying editing control. This property always returns DataGridViewComboBoxEditingControl.
StyleDisabled
Disabled style of the Control (when control is not Enabled).
public ExComboBoxStyle StyleDisabled { get; set; }
Property Value
StyleHighlight
Highlight style of the Control (when mouse is over control).
public ExComboBoxStyle StyleHighlight { get; set; }
Property Value
StyleNormal
Normal style of the Control (when is inactive).
public ExComboBoxStyle StyleNormal { get; set; }
Property Value
StyleSelected
Selected style of the Control (when control is selected).
public ExComboBoxStyle StyleSelected { get; set; }
Property Value
Methods
Clone()
Creates an exact copy of this cell.
public override object Clone()
Returns
- object
An object that represents the cloned DataGridViewComboBoxCell.
InitializeEditingControl(int, object?, DataGridViewCellStyle)
Attaches and initializes the hosted editing control.
public override void InitializeEditingControl(int rowIndex, object? initialFormattedValue, DataGridViewCellStyle dataGridViewCellStyle)
Parameters
rowIndexintThe index of the cell's parent row.
initialFormattedValueobjectThe initial value to be displayed in the control.
dataGridViewCellStyleDataGridViewCellStyleA DataGridViewCellStyle that determines the appearance of the hosted control.
Paint(Graphics, Rectangle, Rectangle, int, DataGridViewElementStates, object?, object?, string?, DataGridViewCellStyle, DataGridViewAdvancedBorderStyle, DataGridViewPaintParts)
Paints the current DataGridViewComboBoxCell.
protected override void Paint(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, int rowIndex, DataGridViewElementStates elementState, object? value, object? formattedValue, string? errorText, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts)
Parameters
graphicsGraphicsThe Graphics used to paint the cell.
clipBoundsRectangleA Rectangle that represents the area of the DataGridView that needs to be repainted.
cellBoundsRectangleA Rectangle that contains the bounds of the cell that is being painted.
rowIndexintThe row index of the cell that is being painted.
elementStateDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values that specifies the state of the cell.
valueobjectThe data of the cell that is being painted.
formattedValueobjectThe formatted data of the cell that is being painted.
errorTextstringAn error message that is associated with the cell.
cellStyleDataGridViewCellStyleA DataGridViewCellStyle that contains formatting and style information about the cell.
advancedBorderStyleDataGridViewAdvancedBorderStyleA DataGridViewAdvancedBorderStyle that contains border styles for the cell that is being painted.
paintPartsDataGridViewPaintPartsA bitwise combination of the DataGridViewPaintParts values that specifies which parts of the cell need to be painted.