Configuration

An object defining configuration options for the dxTextBox widget.

changeAction

An action performed on the 'change' event of the input element representing the widget.

Type: Action
Default Value: null

clickAction

An action performed when a widget is clicked.

Type: Action
Default Value: null

Show Example:
jQuery

disabled

A Boolean value specifying whether or not the widget can respond to user interaction.

Type: Boolean
Default Value: false

Create an observable variable and assign it to this option to specify the availability of the widget at runtime.

Show Example:
jQuery

enterKeyAction

An action performed when the Enter key is pressed, provided that the widget is focused.

Type: Action
Default Value: null

focusInAction

An action performed on the 'focusin' event of the input element representing the widget.

Type: Action
Default Value: null

focusOutAction

An action performed on the 'focusout' event of the input element representing the widget.

Type: Action
Default Value: null

height

Specifies the height of the widget.

Type: Number|String|function
Return Value: Number|String
The widget height.
Default Value: undefined

The option can hold the following types of values.

  • numeric - the height of the widget in pixels
  • string - a CSS measurement of the widget height (e.g., "55px", "80%", "auto" and "inherit")
  • function - a function returning the widget height (e.g., height:function(){ return baseHeight - 10 + "%"; })

keyDownAction

An action performed on the 'keydown' event of the input element representing the widget.

Type: Action
Default Value: null

keyPressAction

An action performed on the 'keypress' event of the input element representing the widget.

Type: Action
Default Value: null

keyUpAction

An action performed on the 'keyup' event of the input element representing the widget.

Type: Action
Default Value: null

maxLength

Specifies the maximum number of characters you can enter into the textbox.

Type: String|Number
Default Value: null

If the number of entered characters reaches the value assigned to this option, the widget does not allow you to enter any more characters.

Show Example:
jQuery

mode

The "mode" attribute value of the actual HTML input element representing the text box.

Type: String
Default Value: "text"
Accepted Values: 'text'|'email'|'search'|'tel'|'url'|'password'

The value of this option affects the set of keyboard buttons shown on the mobile device when the widget gets focus. In addition, the following mode values add visual features to the widget:

  • 'search' - the text box contains the 'X' button, which clears the text box contents
  • 'password' - the text box shows a password character instead of the actual characters typed

placeholder

The text displayed by the widget when the widget value is empty.

Type: String
Default Value: ""

readOnly

A Boolean value specifying whether or not the widget is read-only.

Type: Boolean
Default Value: false

value

Specifies the current value displayed by the widget.

Type: String
Default Value: ""

valueUpdateAction

An action performed when the widget value is updated.

Type: Action
Default Value: null

An object passed to the action function assigned to this option can have the value field in addition to the basic field set. This field contains the new widget value.

valueUpdateEvent

Specifies DOM event names that update a widget's value.

Type: String
Default Value: "change"

The option takes on a string value representing a DOM event name or several DOM event names separated by a space. You can assign any DOM event names to this option. For example, "change", "blur", "input", "keyup", etc.

Show Example:
jQuery

visible

A Boolean value specifying whether or not the widget is visible.

Type: Boolean
Default Value: true

width

Specifies the width of the widget.

Type: Number|String|function
Return Value: Number|String
The widget width.
Default Value: undefined

The option can hold the following types of values.

  • numeric - the widget width in pixels
  • string - a CSS measurement of the widget width (e.g., "55px", "80%", "auto" and "inherit")
  • function - the function returning the widget width (e.g., width:function(){ return baseWidth - 10 + "%"; })