NumericTextBox Blazor API

NumericTextBox Properties

NameTypeDefaultDescription
DecimalSeparatorstring"."Sets or gets the char to use as the decimal separator in numeric values.
DisabledboolfalseEnables or disables the SmartNumericTextBox.
DropDownAppendToobjectN/ASets the parent container of the radix dropdown.
DropDownEnabledboolfalseDetermines if a dropdown will be displayed when the radix display button is clicked. The dropdown shows options for changing to the binary, octal, decimal, and hexadecimal numeral systems.
EnableMouseWheelActionboolfalseEnables or disables incrementing/decrementing the value using the mouse wheel in SmartNumericTextBox.
Hintstring""Sets additional helper text below the element.
InputFormatNumericTextBoxInputFormatNumericTextBoxInputFormat.IntegerSets or gets the input format of the widget. Setting this property dynamically can lead to precision loss.
Labelstring""Sets a label above the element.
LeadingZerosboolfalseIf this property is enabled, leading zeros are added (if necessary) to the binary and hexadecimal representations of a number based on wordLength.
Localestring"en"Sets or gets the language. Used in conjunction with the property messages.
MaxobjectN/ASets or gets the maximum value of the widget.
MessagesobjectN/ASets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
MinobjectN/ASets or gets the minimum value of the widget.
Namestring""The name of the control.
NullableboolfalseEnables or disables the setting of the value property to null or empty string.
IsOpenedboolfalseSets or gets whether the radix dropdown is opened. Applicable only when dropDownEnabled is true.
OutputFormatStringstring"null"Sets or gets the pattern which the input value is displayed in when the element is not focused. All formats available to the NumberRenderer class can be applied as outputFormatString.
Placeholderstring""Determines the widget's place holder displayed when the widget's input is empty.
PrecisionDigitsintN/ADetermines the number of digits after the decimal point. Applicable when inputFormat is either 'floatingPoint' or 'complex'.
RadixNumericTextBoxRadixNumericTextBoxRadix.10Sets or gets the radix of the SmartNumericTextBox. The radix specifies the numeral system in which to display the widget's value. Applicable only when inputFormat is 'integer'.
RadixDisplayboolfalseEnables or disables the radix display button of the SmartNumericTextBox. Applicable only when inputFormat is 'integer'.
RadixDisplayPositionNumericTextBoxDisplayPositionNumericTextBoxDisplayPosition.LeftSets or gets the position of the radix display button of the SmartNumericTextBox.
ReadonlyboolfalseSets or gets the readonly state of the SmartNumericTextBox.
RightToLeftboolfalseSets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
ScientificNotationboolfalseEnables or disables outputting the value in scientific notation. Applicable only when inputFormat is 'integer'.
ShowDropDownValuesboolfalseDetermines whether to show the current value represented in all four numeral systems in the drop down.
ShowUnitboolfalseEnables or disables the visibility of the units.
SignificantDigitsint8Determining how many significant digits are in a number. Applicable when inputFormat is either 'floatingPoint' or 'complex'.
SpinButtonsboolfalseEnables or disables the visibility of the spin buttons.
SpinButtonsDelayint75Sets the delay between repeats of spin buttons in miliseconds.
SpinButtonsInitialDelayint0Sets a delay before the first repeat iteration of spin buttons in miliseconds.
SpinButtonsPositionNumericTextBoxDisplayPositionNumericTextBoxDisplayPosition.RightSets or gets the position of the spin buttons of the SmartNumericTextBox.
SpinButtonsStepobject1Sets or gets the increase/decrease step.
Themestring""Determines the theme. Theme defines the look of the element
UnfocusableboolfalseIf is set to true, the element cannot be focused.
Unitstring"kg"Sets or gets the name of unit used in SmartNumericTextBox widget.
ValidationValidationValidation.StrictSets the value's validation by min/max. If 'strict' is applied, the value is always validated by min and max. If 'interaction' is applied, programmatic value changes are not coerced to min/max and if min/max are changed, resulting in the current value being out of range, the value is not coerced, and no change event is fired.
Valueobject0Sets or gets the value of the SmartNumericTextBox widget.
WordLengthWordLengthWordLength.Int32Sets or gets the word length. Applicable only when inputFormat is 'integer'. If min and/or max are not set by default, they will be set automatically based on the specified word length.

NumericTextBox Methods

NameTypeArgumentsDescription
GetIsOpenedAsync()Task<bool>'N/A'Gets the &quot;IsOpened&quot; property as Task&lt;bool&gt;.
GetValueAsync()Task<object>'N/A'Gets the &quot;Value&quot; property as Task&lt;object&gt;.
Refreshvoid'N/A'Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements.
Rendervoid'N/A'Re-renders the Blazor Component. This method will make a full re-render.
StateHasChangedvoid'N/A'Refreshes the state and Re-renders the Blazor Component, if necessary.
Valstringobject value, bool suppressValidationGet/set the value of the NumericTextBox. Args: string value - The value to be set. If no parameter is passed, returns the displayed value of the smartNumericTextBox. ,string suppressValidation - If "true" is passed, the passed value will be set to the smartNumericTextBox without validation.
ValstringN/AGet/set the value of the NumericTextBox.
Valstringstring value, bool suppressValidationGet/set the value of the NumericTextBox. Args: string value - The value to be set. If no parameter is passed, returns the displayed value of the smartNumericTextBox. ,string suppressValidation - If "true" is passed, the passed value will be set to the smartNumericTextBox without validation.
Valstringint value, bool suppressValidationGet/set the value of the NumericTextBox. Args: int value - The value to be set. If no parameter is passed, returns the displayed value of the smartNumericTextBox. ,string suppressValidation - If "true" is passed, the passed value will be set to the smartNumericTextBox without validation.

NumericTextBox Events

NameTypeDescriptionEvent Detail
OnChangeEventCallback<Event>This event is triggered when the value is changed. N/A
Changedevent NumericTextBoxChangedEventHandlerThis event is triggered when the value is changed. NumericTextBoxChangedEventArgs
OnChangingEventCallback<Event>This event is triggered when the value in the input is being changed via keypress or paste. N/A
Changingevent NumericTextBoxChangingEventHandlerThis event is triggered when the value in the input is being changed via keypress or paste. NumericTextBoxChangingEventArgs
OnCloseEventCallback<Event>This event is triggered when the dropdown is closed. N/A
Closedevent NumericTextBoxClosedEventHandlerThis event is triggered when the dropdown is closed. NumericTextBoxClosedEventArgs
OnClosingEventCallback<Event>This event is triggered when the dropdown is about to be closed. The closing operation can be canceled by calling event.preventDefault() in the event handler function.N/A
Closingevent NumericTextBoxClosingEventHandlerThis event is triggered when the dropdown is about to be closed. The closing operation can be canceled by calling event.preventDefault() in the event handler function.NumericTextBoxClosingEventArgs
OnOpenEventCallback<Event>This event is triggered when the dropdown is opened. N/A
Openedevent NumericTextBoxOpenedEventHandlerThis event is triggered when the dropdown is opened. NumericTextBoxOpenedEventArgs
OnOpeningEventCallback<Event>This event is triggered when the dropdown is about to be opened. The opening operation can be canceled by calling event.preventDefault() in the event handler function.N/A
Openingevent NumericTextBoxOpeningEventHandlerThis event is triggered when the dropdown is about to be opened. The opening operation can be canceled by calling event.preventDefault() in the event handler function.NumericTextBoxOpeningEventArgs
OnRadixChangeEventCallback<Event>This event is triggered when the radix is changed. N/A
RadixChangedevent NumericTextBoxRadixChangedEventHandlerThis event is triggered when the radix is changed. NumericTextBoxRadixChangedEventArgs

Enums

NumericTextBoxInputFormat

NumericTextBoxInputFormat.Integer
NumericTextBoxInputFormat.FloatingPoint
NumericTextBoxInputFormat.Complex

NumericTextBoxRadix

NumericTextBoxRadix.Two
NumericTextBoxRadix.Eight
NumericTextBoxRadix.Ten
NumericTextBoxRadix.Sixteen
NumericTextBoxRadix.Binary
NumericTextBoxRadix.Octal
NumericTextBoxRadix.Decimal
NumericTextBoxRadix.Hexadecimal

NumericTextBoxDisplayPosition

NumericTextBoxDisplayPosition.Left
NumericTextBoxDisplayPosition.Right

Validation

Validation.Strict
Validation.Interaction

WordLength

WordLength.Int8
WordLength.Uint8
WordLength.Int16
WordLength.Uint16
WordLength.Int32
WordLength.Uint32
WordLength.Int64
WordLength.Uint64