MultiRow Windows Forms > Developer's Guide > Using MultiRow > Cell Types > DomainUpDownCell |
The domain up down cell offers features similar to the .NET Framework's DomainUpDown control. The user can use this cell type to provide string selections using a spin button. You can use the combo box cell to select a string from a list just like you would in a domain up down cell; however, when you frequently need to select values around consecutive values, the domain up down cell is faster than a combo box cell. For instance, it can be used for rating notations such as "AAA", "AA", "A", "BBB" or for a set of steps such as "1. Order", "2.Inventory Check", "3.Credit Check", "4.Dispatch", and so on.
In addition to the features of the Base Cell, the domain up down cell lets users select a value using the spin button. For more details on this feature, refer to the DomainUpDownCell class.
The domain up down cell uses an Object value type and this type can be checked with the DomainUpDownCell.ValueType property. The value cast into a String type is used for input and display. This type can be confirmed with the DomainUpDownCell.FormattedValueType property. You can modify behavior during casting by overriding the Object type ToString method. To modify the behavior when values are read in a cell, you can override the DomainUpDownCell.OnCellFormatting method. The behavior when the value is written back from cell can be modified by overriding the DomainUpDownCell.OnCellParsing method.
The value of the domain up down cell can be edited with the DomainUpDownEditingControl control. This control inherits from the IEditingControl interface and the System.Windows.Forms.DomainUpDown class. The cell edit control type can be checked with the DomainUpDownCell.EditType property.
The domain up down cell supports the following members of the CellStyle class. You can set a cell style with the DomainUpDownCell.Style property
CellStyle Members | Non-Editable State | Editable State |
BackColor | Enabled | Enabled |
Border | Enabled | Enabled |
DataSourceNullValue | Enabled | Enabled |
DisabledBackColor | Enabled | - |
DisabledForeColor | Enabled | - |
Font | Enabled | Enabled |
ForeColor | Enabled | Enabled |
Format | Enabled | Enabled |
FormatProvider | Enabled | Enabled |
GradientColors | Enabled | - |
GradientDirection | Enabled | - |
GradientStyle | Enabled | - |
Image | Enabled | - |
ImageAlign | Enabled | - |
ImeMode | Enabled | Enabled |
ImeSentenceMode | Enabled | Enabled |
InputScope | Enabled | Enabled |
LineAdjustment | Enabled only for GDI+ Compatible Mode | - |
Margin | Enabled | Enabled |
Multiline | Enabled | - |
NullValue | Enabled | Enabled |
Padding | Enabled | Enabled |
PatternColor | Enabled | - |
PatternStyle | Enabled | - |
SelectionBackColor | Enabled | - |
SelectionForeColor | Enabled | - |
Tag | Enabled | Enabled |
TextAdjustment | Enabled only for GDI+ Compatible Mode | - |
TextAlign | Enabled | Enabled |
TextAngle | Enabled only for GDI+ Compatible Mode | - |
TextEffect | Enabled | - |
TextImageRelation | Enabled | - |
TextIndent | Enabled | - |
TextVertical | Enabled only for GDI+ Compatible Mode | - |
UseCompatibleTextRendering | Enabled | - |
WordWrap | Enabled | - |
To set GDI+ Compatibility Mode as Enabled, set the UseCompatibleTextRendering property to True.
The table below shows a list of keys processed when the domain up down cell is in an edit state and keys that are processed by the GcMultiRow control.
Modifier | Key | DomainUpDownCell | GcMultiRow |
---|---|---|---|
None | Keys.PageUp | - | Enabled |
Keys.PageDown | - | Enabled | |
Keys.End | Enabled | - | |
Keys.Home | Enabled | - | |
Keys.Left | Enabled | - | |
Keys.Right | Enabled | - | |
Keys.Up | Enabled | - | |
Keys.Down | Enabled | - | |
Keys.Insert | - | - | |
Keys.Delete | Enabled | - | |
Keys.BackSpace | Enabled | - | |
Keys.Control | Keys.PageUp | Enabled | - |
Keys.PageDown | Enabled | - | |
Keys.End | - | Enabled | |
Keys.Home | - | Enabled | |
Keys.Left | Enabled | - | |
Keys.Right | Enabled | - | |
Keys.Up | - | Enabled | |
Keys.Down | - | Enabled | |
Keys.A | Enabled | - | |
Keys.C | Enabled | - | |
Keys.V | Enabled | - | |
Keys.X | Enabled | - | |
Keys.Z | Enabled | - | |
Keys.Shift | Keys.Left | Enabled | - |
Keys.Right | Enabled | - | |
Keys.Up | Enabled | - | |
Keys.Down | Enabled | - | |
Keys.Home | Enabled | - | |
Keys.End | Enabled | - |
|
You can use the GcMultiRow.CellContentClick event to catch a click in the cell content area. You can use the GcMultiRow.CellContentDoubleClick event for a double-click. To implement the processing for any changes in the cell value, you can use the GcMultiRow.CellEditedFormattedValueChanged event. The events of the DomainUpDownEditingControl class are used to implement any processing in the edit state of the domain up down cell. Events similar to the System.Windows.Forms.DomainUpDown class are used in the DomainUpDownEditingControl class.