BinaryTreeListViewDatePickerCell
The cell of a BinaryTreeListViewDatePickerColumn: shows a date in the column's format
and edits it with a drop-down calendar.
public class BinaryTreeListViewDatePickerCell : DataGridViewTextBoxCell
Inherits from / implements: DataGridViewTextBoxCell
Remarks
The column creates its cells, and its settings apply to all of them.
Members at a glance
| Constructors | |
|---|---|
BinaryTreeListViewDatePickerCell | Creates a date cell. A BinaryTreeListViewDatePickerColumn creates its cells itself. |
| Properties | |
DefaultNewRowValue | Gets the value shown in the grid's row for new entries: the current date and time. A tree list view has no such row. |
EditType | Gets the type of the editor the grid creates for this cell: the column's date picker editor. |
ValueType | Gets the type of the cell's value: object, so that it can hold a
DateTime or the text the editor stores. |
| Methods | |
GetFormattedValue | Formats the cell's value for display, in the pattern and culture its column names. |
InitializeEditingControl | Prepares the editor for this cell as editing starts, setting its date from the cell's value. |
Paint | Paints the cell: its date, and the picker's drop-down button when the grid shows the editors' chrome. |
Constructors
BinaryTreeListViewDatePickerCell
Creates a date cell. A BinaryTreeListViewDatePickerColumn creates its cells itself.
Properties
DefaultNewRowValue
Gets the value shown in the grid's row for new entries: the current date and time. A tree list view has no such row.
EditType
Gets the type of the editor the grid creates for this cell: the column's date picker editor.
ValueType
Gets the type of the cell's value: object, so that it can hold a
DateTime or the text the editor stores.
Methods
GetFormattedValue
Formats the cell's value for display, in the pattern and culture its column names.
Remarks
A DateTime, or text that reads as a date, is written with the column's
BinaryTreeListViewDatePickerColumn.Format, BinaryTreeListViewDatePickerColumn.CustomFormat
and BinaryTreeListViewDatePickerColumn.BinaryCultureInfo, on every row. A
Format set on the cell's style still wins, as it does for any
other cell, and any other value is formatted by the grid.
InitializeEditingControl
Prepares the editor for this cell as editing starts, setting its date from the cell's value.
Parameters
rowIndex- The row of the cell.
initialFormattedValue- The value as shown in the cell.
dataGridViewCellStyle- The cell's style.
Remarks
A cell with no value opens the editor empty. A value that does not read as a date opens it at the current date and time.
Paint
Paints the cell: its date, and the picker's drop-down button when the grid shows the editors' chrome.
Remarks
With BinaryTreeListView.SpecialColumnCellsToDisplayEditingControlOnCellsAlways on, a
row that is not being edited shows the drop-down button beside its date: flat – a chevron, in a
hairline box when the column's BinaryTreeListViewDatePickerColumn.ShowBorderAlways is
on – while BinaryTreeListViewDatePickerColumn.DrawStyleIsFlat is on, and the classic
themed push button otherwise.