Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class NumericTextBoxModel<T>

    Show / Hide Table of Contents

    Class NumericTextBoxModel<T>

    Interface for a class NumericTextBox.

    Inheritance
    System.Object
    NumericTextBoxModel<T>
    Namespace: Syncfusion.Blazor.Inputs
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class NumericTextBoxModel<T> : Object
    Type Parameters
    Name Description
    T

    Specifies the type of NumericTextBoxModel.

    Constructors

    NumericTextBoxModel()

    Declaration
    public NumericTextBoxModel()

    Properties

    CssClass

    Specifies the CSS class name that can be appended with the root element of the NumericTextBox. One or more custom CSS classes can be added to a NumericTextBox.

    Declaration
    public string CssClass { get; set; }
    Property Value
    Type Description
    System.String

    Currency

    Specifies the currency code to use in currency formatting. Possible values are the ISO 4217 currency codes, such as 'USD' for the US dollar and 'EUR' for the euro.

    Declaration
    public string Currency { get; set; }
    Property Value
    Type Description
    System.String

    Decimals

    Specifies the number precision applied to the textbox value when the NumericTextBox is focused.

    Declaration
    public Nullable<int> Decimals { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Int32>

    Enabled

    Specifies a boolean value that indicates whether the NumericTextBox allows the user to interact with it.

    Declaration
    public bool Enabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnablePersistence

    Enable or disable persisting NumericTextBox state between page reloads. If enabled, the Value state will be persisted.

    Declaration
    public bool EnablePersistence { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableRtl

    Enable or disable rendering component in right to left direction.

    Declaration
    public bool EnableRtl { get; set; }
    Property Value
    Type Description
    System.Boolean

    FloatLabelType

    Specifies the floating label behavior of the NumericTextBox that the placeholder text floats above the NumericTextBox based on the below values.

    Possible values are:

    • NeverNever floats the label in the NumericTextBox when the placeholder is available.
    • AlwaysThe floating label always floats above the NumericTextBox.
    • AutoThe floating label floats above the NumericTextBox after focusing it or when enters the value in it.
    Declaration
    public FloatLabelType FloatLabelType { get; set; }
    Property Value
    Type Description
    FloatLabelType

    Format

    Specifies the number format that indicates the display format for the value of the NumericTextBox.

    Declaration
    public string Format { get; set; }
    Property Value
    Type Description
    System.String

    HtmlAttributes

    You can add the additional html attributes such as styles, class, and more to the root element.

    If you configured both property and equivalent html attributes, then the component considers the property value.

    Declaration
    public Dictionary<string, object> HtmlAttributes { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.Object>

    InputAttributes

    You can add the additional input attributes such as disabled, value, and more to the root element.

    If you configured both property and equivalent input attribute, then the component considers the property value.

    Declaration
    public Dictionary<string, object> InputAttributes { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.Object>

    Max

    Specifies a maximum value that is allowed a user can enter.

    Declaration
    public T Max { get; set; }
    Property Value
    Type Description
    T

    Min

    Specifies a minimum value that is allowed a user can enter.

    Declaration
    public T Min { get; set; }
    Property Value
    Type Description
    T

    Placeholder

    Specifies the text that is shown as a hint or placeholder until the user focuses or enter a value in TextBox. The property is depending on the FloatLabelType property.

    Declaration
    public string Placeholder { get; set; }
    Property Value
    Type Description
    System.String

    Readonly

    Specifies the boolean value whether the NumericTextBox allows user to change the text.

    Declaration
    public bool Readonly { get; set; }
    Property Value
    Type Description
    System.Boolean

    ShowClearButton

    Specifies a boolean value that indicates whether the clear button is displayed in NumericTextBox.

    Declaration
    public bool ShowClearButton { get; set; }
    Property Value
    Type Description
    System.Boolean

    ShowSpinButton

    Specifies whether the up and down spin buttons will be displayed in NumericTextBox.

    Declaration
    public bool ShowSpinButton { get; set; }
    Property Value
    Type Description
    System.Boolean

    Step

    Specifies the incremental or decremental step size for the NumericTextBox.

    Declaration
    public T Step { get; set; }
    Property Value
    Type Description
    T

    StrictMode

    Specifies a value that indicates whether the NumericTextBox component allows the value for the specified range.

    True- the input value will be restricted between the min and max range. The typed value gets modified to fit the range on a focused out state.

    Else, it allows any value even out of range value, at that time of wrong value entered, the error class will be added to the component to highlight the error.

    Declaration
    public bool StrictMode { get; set; }
    Property Value
    Type Description
    System.Boolean

    TabIndex

    Specifies the tab order of the NumericTextBox component.

    Declaration
    public int TabIndex { get; set; }
    Property Value
    Type Description
    System.Int32

    ValidateDecimalOnType

    Specifies whether the length of the decimal should be restricted during typing.

    Declaration
    public bool ValidateDecimalOnType { get; set; }
    Property Value
    Type Description
    System.Boolean

    Value

    Sets the value of the NumericTextBox.

    Declaration
    public T Value { get; set; }
    Property Value
    Type Description
    T

    Width

    Specifies the width of the NumericTextBox component.

    Declaration
    public string Width { get; set; }
    Property Value
    Type Description
    System.String
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved