GrapeCity MultiRow Windows Forms Documentation
NumericUpDownCell

The numeric up down cell provides features similar to that of the .NET Framework NumericUpDown control (System.Windows.Forms.NumericUpDown). Users can only enter numeric values in the numeric up down cell. The appearance of the numeric up down cell spin button depends on visual style settings.

Features

The numeric up down cell provides the following features in addition to the Basic Cell features.

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

Data Types

NumericUpDownCell stores values of Object type and this type can be verified using the NumericUpDownCell.ValueType property. In NumericUpDownCell, values cast into a Decimal type can be used. This type can be verified using the NumericUpDownCell.FormattedValueType property. To modify the behavior when values are read in a cell, you can override the NumericUpDownCell.OnCellFormatting method. The behavior when the value is written back from cell can be modified by overriding the NumericUpDownCell.OnCellParsing method.

Cell Editing Control

The numeric up down cell values can be edited using the NumericUpDownEditingControl. This control inherits the IEditingControl interface and the System.Windows.Forms.NumericUpDown class. The cell editing control type can be verified using the NumericUpDownCell.EditType property.

Styles

The numeric up down cell supports the following members of the CellStyle class. You can set cell styles using the NumericUpDownCell.Style property.

CellStyle Member 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 - -
FormatProvider - -
GradientColors Enabled -
GradientDirection Enabled -
GradientStyle Enabled -
Image Enabled -
ImageAlign Enabled -
ImeMode Enabled Enabled
ImeSentenceMode Enabled Enabled
InputScope 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 -

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

Shortcut Keys

The table below lists all the keys supported while editing the numeric up down cell and the keys processed by the GcMultiRow control.

Modifier Key DateTimePickerCell 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 - -
Keys.PageDown - -
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.Shift Keys.Left Enabled -
Keys.Right Enabled -
Keys.Up Enabled -
Keys.Down Enabled -
Keys.Home Enabled -
Keys.End Enabled -

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

Events

The GcMultiRow.CellContentClick event can be used to implement processing for a mouse click in the cell content area. Use the GcMultiRow.CellContentDoubleClick event for a double-click. The GcMultiRow.CellEditedFormattedValueChanged event can be used to implement processing when the cell value is changed. The NumericUpDownEditingControl class events can be used to handle processing for events when the numeric up down cell is being edited.

Comparison with Standard Control

The following table shows a comparison of major properties between the numeric up down cell and the System.Windows.Forms.NumericUpDown control.

NumericUpDownCell NumericUpDown
Accelerations Accelerations
Style.BackColor BackColor
DecimalPlaces DecimalPlaces
Style.ForeColor ForeColor
Hexadecimal Hexadecimal
Increment Increment
InterceptArrowKeys InterceptArrowKeys
Maximum Maximum
Minimum Minimum
None Text
ThousandsSeparator ThousandsSeparator
Value Value
UpDownAlign UpDownAlign

For more information, see the following topics:

See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options