HypernovaDesktop Components · docs
Binarymission
WinForms › Tree List View › BinaryTreeListViewDatePickerColumn

BinaryTreeListViewDatePickerColumn

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WinForms.Controls.TreeControls

A column of dates, edited with a Binarymission BinaryDatePicker and its drop-down calendar.

public class BinaryTreeListViewDatePickerColumn : DataGridViewColumn

Inherits from / implements: DataGridViewColumn

Remarks

Give the cells DateTime values, or text that parses as a date. Every row shows its date in the column's Format and BinaryCultureInfo; while BinaryTreeListView.SpecialColumnCellsToDisplayEditingControlOnCellsAlways is on, it also shows the picker's drop-down button. The calendar's colours, buttons and markers are set on the column and copied to each cell's editor when editing starts.

A date the user picks is stored back in the cell as text – the date and time written in the current culture's general format – so read it with ToDateTime() rather than a cast.

Examples

BinaryTreeListViewDatePickerColumn due = new BinaryTreeListViewDatePickerColumn
{
    Name = "Due",
    HeaderText = "Due",
    Format = BinaryDatePickerFormat.Custom,
    CustomFormat = "ddd d MMM yyyy",
    TodayButtonText = "Today",
    SelectionDateEllipseColor = Color.SteelBlue
};
plan.Columns.Add(due);

// Later, read a node's due date whichever way it was stored.
DateTime dueDate = Convert.ToDateTime(plan.CurrentNode.Cells["Due"].Value);

See also

Members at a glance

Constructors
BinaryTreeListViewDatePickerColumnCreates a date column whose cells are BinaryTreeListViewDatePickerCell objects.
Properties
BinaryCultureInfoGets or sets the culture the column's dates are written in and its calendar is shown in – month and day names, and the first day of the week.
BorderColorGets or sets the colour of the border round the date.
CalendarForeColorGets or sets the colour of the calendar's dates and day names.
CalendarInactiveDateForeColorGets or sets a colour for the days of the previous and next months shown in the calendar.
CalendarLegendDisplayGets or sets whether the calendar shows a legend at its foot explaining the selected-date and today markers.
CalendarMonthAndYearTrackerColorGets or sets the colour of the arrows either side of the calendar's month and year title, which move to the previous and next month.
CalendarMonthBackColorGets or sets the background colour of the calendar.
CalendarMonthTitleForeColorGets or sets the colour of the calendar's month and year title.
CloseButtonBackColorGets or sets the background colour of the calendar's Close button.
CloseButtonFlatStyleGets or sets the flat style of the calendar's Close button.
CloseButtonForeColorGets or sets the text colour of the calendar's Close button.
CloseButtonTextGets or sets the caption of the calendar's button that closes it.
CustomDropDownImageGets or sets a picture of your own for the editor's drop-down button.
CustomFormatGets or sets the date pattern the column uses when Format is BinaryDatePickerFormat.Custom.
DotBorderDepthGets or sets the length of each dash of the editor's dotted border.
DotBorderGapGets or sets the gap between the dashes of the editor's dotted border.
DrawBorderAsGets or sets whether the editor's border is a continuous line or dotted.
DrawStyleIsFlatGets or sets whether cells that are not being edited draw their drop-down button flat – a chevron, inside a hairline box when ShowBorderAlways is on – or as the classic themed push button.
EditControlStyleIsExtendedGets or sets whether the editor's date box has the extended border: one that appears on hover and focus, can be dotted, and takes BorderColor.
FormatGets or sets how the column shows its dates: the culture's long or short date pattern, or CustomFormat.
MarkSelectedDateGets or sets whether the calendar marks the selected date and today's date with a filled circle.
SelectionDateEllipseColorGets or sets the colour of the circle that marks the selected date in the calendar.
SelectionDateForeColorGets or sets the colour of the selected date's number in the calendar.
ShowBorderAlwaysGets or sets whether a border is drawn round the date at all times, rather than only while the pointer is over the editor or it has the focus.
TodayButtonBackColorGets or sets the background colour of the calendar's Today button.
TodayButtonFlatStyleGets or sets the flat style of the calendar's Today button.
TodayButtonForeColorGets or sets the text colour of the calendar's Today button.
TodayButtonTextGets or sets the caption of the calendar's button that picks today's date.
TodayCloseButtonsAreVisibleGets or sets whether the drop-down calendar has its Today and Close buttons.
TodayEllipseColorGets or sets the colour of the circle that marks today's date in the calendar.
TodayForeColorGets or sets the colour of today's date number in the calendar.
UseDropDownImageStyleGets or sets what the editor's drop-down button shows: an arrow, a calendar picture, or CustomDropDownImage.
Methods
CloneCreates a copy of the column with all its settings except CalendarInactiveDateForeColor, which keeps its default.

Constructors

BinaryTreeListViewDatePickerColumn

public BinaryTreeListViewDatePickerColumn() : base(new BinaryTreeListViewDatePickerCell())

Creates a date column whose cells are BinaryTreeListViewDatePickerCell objects.

Properties

BinaryCultureInfo

public CultureInfo BinaryCultureInfo

Gets or sets the culture the column's dates are written in and its calendar is shown in – month and day names, and the first day of the week.

Value
The current culture of the thread that created the column, by default.
Remarks

Applies to every row as it is shown, and to the editor. A cell style with a Format of its own is formatted by the grid instead.

Example
dueColumn.BinaryCultureInfo = new CultureInfo("fr-FR");   // "vendredi 6 novembre 2026"

BorderColor

public Color BorderColor

Gets or sets the colour of the border round the date.

Value
SystemColors.ControlDarkDark by default.
Remarks

Used for the editor's border, and for the hairline box of cells that are not being edited when ShowBorderAlways is on. Copied to the cell's editor when editing starts, as BinaryDatePicker.BorderColor.

CalendarForeColor

public Color CalendarForeColor

Gets or sets the colour of the calendar's dates and day names.

Value
SystemColors.ControlText by default.
Remarks

Copied to the cell's editor when editing starts, as BinaryDatePicker.CalendarForeColor.

CalendarInactiveDateForeColor

public Color CalendarInactiveDateForeColor

Gets or sets a colour for the days of the previous and next months shown in the calendar.

Value
SystemColors.ControlDark by default.
Remarks

The column does not pass this colour to the cell's editor, so setting it does not change the calendar.

CalendarLegendDisplay

public bool CalendarLegendDisplay

Gets or sets whether the calendar shows a legend at its foot explaining the selected-date and today markers.

Value
true by default.
Remarks

Copied to the cell's editor when editing starts, as BinaryDatePicker.CalendarLegendDisplay.

CalendarMonthAndYearTrackerColor

public Color CalendarMonthAndYearTrackerColor

Gets or sets the colour of the arrows either side of the calendar's month and year title, which move to the previous and next month.

Value
Maroon, RGB 128, 0, 0, by default.
Remarks

Copied to the cell's editor when editing starts, as BinaryDatePicker.CalendarMonthAndYearTrackerColor.

CalendarMonthBackColor

public Color CalendarMonthBackColor

Gets or sets the background colour of the calendar.

Value
SystemColors.Window by default.
Remarks

Copied to the cell's editor when editing starts, as BinaryDatePicker.CalendarMonthBackColor.

CalendarMonthTitleForeColor

public Color CalendarMonthTitleForeColor

Gets or sets the colour of the calendar's month and year title.

Value
Maroon, RGB 128, 0, 0, by default.
Remarks

Copied to the cell's editor when editing starts, as BinaryDatePicker.CalendarMonthTitleForeColor.

CloseButtonBackColor

public Color CloseButtonBackColor

Gets or sets the background colour of the calendar's Close button.

Value
DefaultBackColor by default.
Remarks

Copied to the cell's editor when editing starts, as BinaryDatePicker.CloseButtonBackColor.

CloseButtonFlatStyle

public FlatStyle CloseButtonFlatStyle

Gets or sets the flat style of the calendar's Close button.

Value
Standard by default.
Remarks

Copied to the cell's editor when editing starts, as BinaryDatePicker.CloseButtonFlatStyle.

CloseButtonForeColor

public Color CloseButtonForeColor

Gets or sets the text colour of the calendar's Close button.

Value
DefaultForeColor by default.
Remarks

Copied to the cell's editor when editing starts, as BinaryDatePicker.CloseButtonForeColor.

CloseButtonText

public string CloseButtonText

Gets or sets the caption of the calendar's button that closes it.

Value
"Close" by default.
Remarks

Set it to translate the button. The button is a fixed 47 by 20 logical pixels, so keep the caption short. Copied to the cell's editor when editing starts, as BinaryDatePicker.CloseButtonText.

CustomDropDownImage

public Bitmap CustomDropDownImage

Gets or sets a picture of your own for the editor's drop-down button.

Value
null, the default, for the built-in picture.
Remarks

Shown when UseDropDownImageStyle is DropDownImageStyle.CustomImage. It is not used by cells that are not being edited. Copied to the cell's editor when editing starts, as BinaryDatePicker.CustomDropDownImage.

CustomFormat

public string CustomFormat

Gets or sets the date pattern the column uses when Format is BinaryDatePickerFormat.Custom.

Value
A .NET date and time format string, such as "dd MMM yyyy" or "MMMM d, yyyy 'at' HH:mm"; an empty string by default, which shows the short date pattern.
Remarks

Setting Format to BinaryDatePickerFormat.Long or BinaryDatePickerFormat.Short replaces this with "D" or "d", so set Format first. A pattern that cannot format a date leaves the grid's own formatting in place.

Example
dueColumn.Format = BinaryDatePickerFormat.Custom;
dueColumn.CustomFormat = "ddd d MMM";       // "Fri 6 Nov"

DotBorderDepth

public int DotBorderDepth

Gets or sets the length of each dash of the editor's dotted border.

Value
4 by default.
Remarks

Used while DrawBorderAs is BorderState.Dotted. Copied to the cell's editor when editing starts, as BinaryDatePicker.DotBorderDepth.

DotBorderGap

public int DotBorderGap

Gets or sets the gap between the dashes of the editor's dotted border.

Value
5 by default.
Remarks

Used while DrawBorderAs is BorderState.Dotted. Copied to the cell's editor when editing starts, as BinaryDatePicker.DotBorderGap.

DrawBorderAs

public BorderState DrawBorderAs

Gets or sets whether the editor's border is a continuous line or dotted.

Value
BorderState.Normal, a continuous line, by default.
Remarks

Applies while EditControlStyleIsExtended is on. Copied to the cell's editor when editing starts, as BinaryDatePicker.DrawBorderAs.

DrawStyleIsFlat

public bool DrawStyleIsFlat

Gets or sets whether cells that are not being edited draw their drop-down button flat – a chevron, inside a hairline box when ShowBorderAlways is on – or as the classic themed push button.

Value
true by default, matching the other special columns.
Default
true
Remarks

Applies while the grid's BinaryTreeListView.SpecialColumnCellsToDisplayEditingControlOnCellsAlways is on, which is when cells show their editor's chrome at all.

EditControlStyleIsExtended

public bool EditControlStyleIsExtended

Gets or sets whether the editor's date box has the extended border: one that appears on hover and focus, can be dotted, and takes BorderColor.

Value
true by default.
Remarks

DrawBorderAs, ShowBorderAlways, DotBorderDepth and DotBorderGap apply only while it is on. Copied to the cell's editor when editing starts, as BinaryDatePicker.EditControlStyleIsExtended.

Format

public BinaryDatePickerFormat Format

Gets or sets how the column shows its dates: the culture's long or short date pattern, or CustomFormat.

Value
BinaryDatePickerFormat.Long by default.
Remarks

Applies to every row, in the column's BinaryCultureInfo, and to the editor.

Setting BinaryDatePickerFormat.Long or BinaryDatePickerFormat.Short replaces CustomFormat with "D" or "d". For a custom pattern, set this to BinaryDatePickerFormat.Custom first and CustomFormat after it.

MarkSelectedDate

public bool MarkSelectedDate

Gets or sets whether the calendar marks the selected date and today's date with a filled circle.

Value
true by default.
Remarks

The circles are in SelectionDateEllipseColor and TodayEllipseColor. Copied to the cell's editor when editing starts, as BinaryDatePicker.MarkSelectedDate.

SelectionDateEllipseColor

public Color SelectionDateEllipseColor

Gets or sets the colour of the circle that marks the selected date in the calendar.

Value
Color.Blue by default.
Remarks

Drawn while MarkSelectedDate is on. Copied to the cell's editor when editing starts, as BinaryDatePicker.SelectionDateEllipseColor.

See also

SelectionDateForeColor

public Color SelectionDateForeColor

Gets or sets the colour of the selected date's number in the calendar.

Value
Color.Yellow by default, to read on the default blue circle.
Remarks

Copied to the cell's editor when editing starts, as BinaryDatePicker.SelectionDateForeColor.

See also

ShowBorderAlways

public bool ShowBorderAlways

Gets or sets whether a border is drawn round the date at all times, rather than only while the pointer is over the editor or it has the focus.

Value
false by default.
Remarks

It also gives cells that are not being edited a hairline box in BorderColor, when they show the flat chrome (DrawStyleIsFlat). Copied to the cell's editor when editing starts, as BinaryDatePicker.ShowBorderAlways.

TodayButtonBackColor

public Color TodayButtonBackColor

Gets or sets the background colour of the calendar's Today button.

Value
DefaultBackColor by default.
Remarks

Copied to the cell's editor when editing starts, as BinaryDatePicker.TodayButtonBackColor.

TodayButtonFlatStyle

public FlatStyle TodayButtonFlatStyle

Gets or sets the flat style of the calendar's Today button.

Value
Standard by default.
Remarks

Copied to the cell's editor when editing starts, as BinaryDatePicker.TodayButtonFlatStyle.

TodayButtonForeColor

public Color TodayButtonForeColor

Gets or sets the text colour of the calendar's Today button.

Value
DefaultForeColor by default.
Remarks

Copied to the cell's editor when editing starts, as BinaryDatePicker.TodayButtonForeColor.

TodayButtonText

public string TodayButtonText

Gets or sets the caption of the calendar's button that picks today's date.

Value
"Today" by default.
Remarks

Set it to translate the button. The button is a fixed 47 by 20 logical pixels, so keep the caption short. Copied to the cell's editor when editing starts, as BinaryDatePicker.TodayButtonText.

TodayCloseButtonsAreVisible

public bool TodayCloseButtonsAreVisible

Gets or sets whether the drop-down calendar has its Today and Close buttons.

Value
true by default.
Remarks

Copied to the cell's editor when editing starts, as BinaryDatePicker.TodayCloseButtonsAreVisible.

TodayEllipseColor

public Color TodayEllipseColor

Gets or sets the colour of the circle that marks today's date in the calendar.

Value
Color.Green by default.
Remarks

Drawn while MarkSelectedDate is on. Copied to the cell's editor when editing starts, as BinaryDatePicker.TodayEllipseColor.

See also

TodayForeColor

public Color TodayForeColor

Gets or sets the colour of today's date number in the calendar.

Value
Color.Yellow by default, to read on the default green circle.
Remarks

Copied to the cell's editor when editing starts, as BinaryDatePicker.TodayForeColor.

See also

UseDropDownImageStyle

public DropDownImageStyle UseDropDownImageStyle

Gets or sets what the editor's drop-down button shows: an arrow, a calendar picture, or CustomDropDownImage.

Value
DropDownImageStyle.DropDownArrow by default.
Remarks

Copied to the cell's editor when editing starts, as BinaryDatePicker.UseDropDownImageStyle.

Methods

Clone

public override object Clone()

Creates a copy of the column with all its settings except CalendarInactiveDateForeColor, which keeps its default.

Returns