BinaryTreeListViewNumericUpDownCell
A specialist cell class that will host our custom control BinaryNumericUpDown control as its editing control.
public class BinaryTreeListViewNumericUpDownCell : DataGridViewTextBoxCell
Inherits from / implements: DataGridViewTextBoxCell
Members at a glance
BinaryTreeListViewNumericUpDownCell | Initializes a new instance of the BinaryTreeListViewNumericUpDownCell class. |
DecimalPlaces | Gets or sets the Decimal places for the control. |
EditType | Gets the type of the control this cell uses for editing. |
Increment | Gets or sets the "increment" value for this control. |
Maximum | Gets or sets the Maximum value for this control. |
Minimum | Gets or sets the Minimum value for the control. |
ThousandsSeparator | Gets or sets the Thousands separator setting for the control. |
ValueType | Gets the type of the value this cell holds. |
Clone | Creates a copy of this BinaryTreeListViewNumericUpDownCell, carrying across every setting this type adds to the base implementation. |
DetachEditingControl | Detaches the editing control from the grid when editing finishes. |
GetErrorIconBounds | Returns where the cell's error icon is drawn, adjusted for the extra chrome this cell type paints. |
GetFormattedValue | Formats the cell value for display, applying the spinner's decimal places and thousands separator rather than the grid's default numeric formatting. |
GetPreferredSize | Returns the size this BinaryTreeListViewNumericUpDownCell would like to be for the given constraint. |
InitializeEditingControl | Prepares the editing control that this cell hands to the grid, pushing the cell's own settings onto it before editing starts. |
KeyEntersEditMode | Reports whether a key press should start editing this cell. Digits, the sign and the decimal separator do; other characters do not. |
Paint | Paints this cell. The base implementation draws the standard cell; this override adds the parts specific to BinaryTreeListViewNumericUpDownCell. |
PositionEditingControl | Positions the editing control within the cell. |
ToString | Returns a short description of this BinaryTreeListViewNumericUpDownCell, which is what the designer shows for the property. |
Constructors
BinaryTreeListViewNumericUpDownCell
Initializes a new instance of the BinaryTreeListViewNumericUpDownCell class.
Properties
DecimalPlaces
Gets or sets the Decimal places for the control.
EditType
Gets the type of the control this cell uses for editing.
Increment
Gets or sets the "increment" value for this control.
Maximum
Gets or sets the Maximum value for this control.
Minimum
Gets or sets the Minimum value for the control.
ThousandsSeparator
Gets or sets the Thousands separator setting for the control.
ValueType
Gets the type of the value this cell holds.
Methods
Clone
Creates a copy of this BinaryTreeListViewNumericUpDownCell, carrying across every setting this type adds to the base implementation.
DetachEditingControl
Detaches the editing control from the grid when editing finishes.
GetErrorIconBounds
Returns where the cell's error icon is drawn, adjusted for the extra chrome this cell type paints.
GetFormattedValue
Formats the cell value for display, applying the spinner's decimal places and thousands separator rather than the grid's default numeric formatting.
- value
- The value held by the cell.
- rowIndex
- The row this cell belongs to.
- cellStyle
- The style in force, which may be adjusted.
- valueTypeConverter
- A converter for the stored type, if any.
- formattedValueTypeConverter
- A converter for the display type, if any.
- context
- Why the value is being formatted.
Returns. The value as it is to be displayed.
GetPreferredSize
Returns the size this BinaryTreeListViewNumericUpDownCell would like to be for the given constraint.
InitializeEditingControl
Prepares the editing control that this cell hands to the grid, pushing the cell's own settings onto it before editing starts.
KeyEntersEditMode
Reports whether a key press should start editing this cell. Digits, the sign and the decimal separator do; other characters do not.
- e
- The key that was pressed.
Returns. true when the key should begin an edit.
Paint
Paints this cell. The base implementation draws the standard cell; this override adds the parts specific to BinaryTreeListViewNumericUpDownCell.
SpecialColumnCellsToDisplayEditingControlOnCellsAlways on, a row that is not being edited shows the spinner's chrome beside its value. With the column's DrawStyleIsFlat on - its default - that is a flat pair of chevrons in the column's colours, inside a hairline box when ShowBorderAlways is on. Off, it is the classic 3D spinner picture. Until 2026-09 the picture was drawn whatever DrawStyleIsFlat said: the flat style and every colour on the column reached the one row being edited and no other, and the value was drawn across the whole cell with the picture laid over its right-hand end (HANDOVER 3av).PositionEditingControl
Positions the editing control within the cell.
ToString
Returns a short description of this BinaryTreeListViewNumericUpDownCell, which is what the designer shows for the property.