aspnetcore-js-devexpress-dot-richedit-cea03999.md
Declares ribbon number box item settings.
export interface RibbonNumberBoxItemOptions
Specifies whether an item separator should be displayed before the current item.
beginGroup?: boolean
| Type | Description |
|---|---|
| boolean |
true to display a separator before the item; otherwise, false.
|
Specifies the item value’s display format and controls user input accordingly.
format?: string
| Type | Description |
|---|---|
| string |
The format. Default value: “text #0.#”.
|
Show predefined formats
| Format | Value | Formatted Value |
|---|---|---|
| “fixedPoint” | 100.11 | 100 |
| “decimal” | 100.11 | 100.11 |
| “percent” | 0.1011 | 10% |
| “currency” | 100.11 | $100 |
var ribbonNumberBox = new DevExpress.RichEdit.RibbonNumberBoxItem();
ribbonNumberBox.format = 'currency';
Show custom formats
A custom format is a string that contains wildcard characters. The table below list the supported characters:
| Character | Description |
|---|---|
| 0 | A digit. Displays ‘0’ if it is not specified in the UI. |
| # | A digit or nothing. One symbol can denote several integer digits, but only one decimal digit. |
| . | A decimal separator. Displayed according to the specified locale. |
| , | A group separator. Displayed according to the specified locale. |
| % | The percent sign. Multiplies the input value by 100. |
| ; | Separates formats for positive and negative values. |
| Other characters | Any character. Should be placed only at the format string’s beginning or end. |
Enclose a wildcard character in single quotes (‘%’) to add this sign to the input value.
The table below demonstrates how you can format numeric values.
| Format | Value | Formatted Value |
|---|---|---|
| “$ #,##0.##” | 14500.55 | $ 14,500.55 |
| “$ #,##0.##;($ #,##0.##)” | -2314.12 | |
| 2314.12 | ($ 2,314.12) | |
| $ 2,314.12 | ||
| “#0%” | 0.15 | 15% |
| “#,##0.00” | 13415.24 | 13,415.24 |
| “#0.## kg” | 3.14 | 3.14 kg |
Specifies an identifier that allows you to localize the item’s text.
localizationId?: string
| Type | Description |
|---|---|
| string |
The item’s localization identifier.
|
If the text property is specified, the item is not localized.
See Also
Angular Application - Custom Localization Strings
Specifies the maximum acceptable value in the number box.
max?: number
| Type | Description |
|---|---|
| number |
The maximum value.
|
Specifies the minimum acceptable value in the number box.
min?: number
| Type | Description |
|---|---|
| number |
The minimum value.
|
Specifies how much the item’s value changes when a user clicks the spin buttons.
step?: number
| Type | Description |
|---|---|
| number |
The incremental step.
|
Specifies the current item value.
value?: number
| Type | Description |
|---|---|
| number |
The item value.
|
Specifies the item width.
width?: any
| Type | Description |
|---|---|
| any |
The item width.
|