Numeric editor is an editor which consists of input area and a pair of buttons for adjusting value.
Buttons are used to increment or decrement numeric values displayed in the editor's input area. The editor's value can either be an integer or decimal. Each time the UP arrow is clicked the value is increased by the value defined in editor's properties. Click on the down arrow button decreases the editor's current value by the same value.
The appearance and the behaviour of the Numeric editor can be defined with its properties:
Property | Description |
---|---|
FormatString | Defines the format in which the text will be displayed. |
NullText | Defines the string that is displayed if the value of a field is missing or null. |
ShowText | If property is set to True, the value is displayed together with the icon. If property is set to False, only the icon is displayed. |
AllowNullInput | If property is set to True, null value can be entered in the editor. |
Increment | Defines the number for which the value will be changed when up or down arrow is clicked. |
IsFloating | If property is set to True, numeric values with decimal places can also be presented. |
MaxValue | Defines the upper limit for the entered numeric value. Value is edited in Expression Designer therefore it is not necessary to be a constant value but it can be any value defined by the expression. |
MinValue | Defines the lowest limit for the entered numeric value. Value is edited in Expression Designer therefore it is not necessary to be a constant value but it can be any value defined by the expression. |
Example (MxSpace)
To see the implementation of a Numeric editor in MxSpace application click Production -> Manage. See that columns (Planned Qty and Actual Qty.) can be edited with numeric editor.
To implement a Numeric editor on a field
- Open appropriate adapter (WorkOrderAdapter) in Solution Explorer.
- Expand the desired field (PlannedQuantity) in the appropriate data source schema (WorkOrder).
- Click Editor node and select NumericEditor from a list of editors in the Available Editors section on the right.
- Set FormatString property to {0:n2}.
- Set Increment property to 10.
- Set MinValue property to 0.
MxAdapter
Editors