GrapeCity MultiRow Windows Forms Documentation
DateTimePickerCell

The date time picker cell provides features similar to that of the DateTimePicker control (System.Windows.Forms.DateTimePicker) in the .NET Framework. The user can enter dates and times using the date time picker cell. The appearance of the date time picker cell depends on Windows settings.

DateTimePickerCell

Features

The date time picker cell provides the following features in addition to the Base Cell features.

Refer to the DateTimePickerCell class reference for details on each of these features.

Data Type

The date time picker cell stores Object type values. This type can be verified using the DateTimePickerCell.ValueType property. Values transformed into a Date type (System.DateTime type in case of C#) based on the format of the DateTimePickerCell.Format property are used for input and display.This type can be verified using the DateTimePickerCell.FormattedValueType. To modify the behavior when values are read in a cell, you can override the DateTimePickerCell.OnCellFormatting method. The behavior when the value is written back from the cell can be modified by overriding the DateTimePickerCell.OnCellParsing method.

Cell Edit Control

The date time picker cell values can be edited using the DateTimePickerEditingControl control. This control inherits the IEditingControl interface and System.Windows.Forms.DateTimePicker class. The cell editing control type can be verified using the DateTimePickerCell.EditType property.

Styles

The date time picker cell supports the following CellStyle class members. You can set cell styles using the DateTimePickerCell.Style property.

CellStyle Member Non-editable state Editable state
BackColor Enabled -
Border Enabled Enabled
DataSourceNullValue Enabled Enabled
DisabledBackColor Enabled -
DisabledForeColor Enabled -
Font Enabled Enabled
ForeColor Enabled -
Format - -
FormatProvider - -
GradientColors Enabled -
GradientDirection Enabled -
GradientStyle Enabled -
Image Enabled -
ImageAlign Enabled -
ImeMode Enabled Enabled
InputScope Enabled Enabled
ImeSentenceMode Enabled Enabled
LineAdjustment Enabled only in GDI+ compatibility mode -
Margin Enabled Enabled
Multiline Enabled Enabled
NullValue Enabled Enabled
Padding Enabled Enabled
PatternColor Enabled -
PatternStyle Enabled -
SelectionBackColor Enabled -
SelectionForeColor Enabled -
Tag Enabled Enabled
TextAdjustment Enabled only in GDI+ compatibility mode -
TextAlign Enabled Only for vertical direction
TextAngle Enabled only in GDI+ compatibility mode -
TextEffect Enabled -
TextImageRelation Enabled -
TextIndent Enabled -
TextVertical Enabled only in GDI+ compatibility mode -
UseCompatibleTextRendering Enabled -
WordWrap Enabled -

The GDI+ Compatibility Mode can be enabled by setting the UseCompatibleTextRendering property to True.

Shortcut Keys

The table below lists all the supported keys when editing the date time picker cell and lists keys processed by the GcMultiRow control.

Modifier Key DateTimePickerCell GcMultiRow
None Keys.PageUp - -
Keys.PageDown - -
Keys.End Enabled -
Keys.Home Enabled -
Keys.Left Enabled -
Keys.Right Enabled -
Keys.Up Enabled -
Keys.Down Enabled -
Keys.Insert - -
Keys.Delete - -
Keys.BackSpace - -
Keys.F4 Enabled -
Keys.Control Keys.PageUp - -
Keys.PageDown - -
Keys.End Enabled -
Keys.Home Enabled -
Keys.Left - Enabled
Keys.Right - Enabled
Keys.Up - Enabled
Keys.Down - Enabled
Keys.A - -
Keys.C - -
Keys.V - -
Keys.X - -
Keys.Shift Keys.Left Enabled -
Keys.Right Enabled -
Keys.Up Enabled -
Keys.Down Enabled -
Keys.Home Enabled -
Keys.End Enabled -
Keys.Alt Keys.Up Enabled -
Keys.Down Enabled -

Keys.Control + Keys.C is processed by the GcMultiRow control in case multiple cells have been selected.

The following keys are not processed when the DateTimePicker.ShowUpDown property is set to True.

Modifier Key DateTimePickerCell GcMultiRow
None Keys.F4 - -
Keys.Alt Keys.Up - -
Keys.Down - -

Events

The GcMultiRow.CellContentClick event can be used to implement the processing when clicking in the content area of the cell. The GcMultiRow.CellContentDoubleClick event can be used for a double-click. The GcMultiRow.CellEditedFormattedValueChanged event can be used to implement the processing when the cell value is changed. Events in the DateTimePickerEditingControl class can be used to handle the processing for events when the date time picker cell is being edited. The same set of events used for the System.Windows.Forms.DateTimePicker class can be used for the DateTimePickerEditingControl class.

Standard Control Comparison

The following table shows a comparison between the main properties of the date time picker cell and the System.Windows.Forms.DateTimePicker control.

DateTimePickerCell DateTimePicker
CalendarFont CalendarFont
CalendarForeColor CalendarForeColor
CalendarMonthBackground CalendarMonthBackground
CalendarTitleBackColor CalendarTitleBackColor
CalendarTitleForeColor CalendarTitleForeColor
CalendarTrailingForeColor CalendarTrailingForeColor
CustomFormat CustomFormat
DropDownAlign DropDownAlign
Format Format
MaxDate MaxDate
MinDate MinDate
ShowUpDown ShowUpDown
ShowDropDownButton None
None PreferredHeight
None RightToLeftLayout
None ShowCheckBox
None Checked
DisplayText Text
Value Value

See the following for more information:

See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options