Skip to content

FilteredTextBoxExtender

MikhailTymchukDX edited this page Apr 12, 2017 · 3 revisions

Demo Page

FFilteredTextBox is an extender that either allows users to enter only characters that you define into a text box or prevents users from entering specified characters.

Note that as the extender relies on JavaScript, you should never assume that data that is sent to the server consists only of allowed characters. Always perform server-side validation check on data that is sent from the client.

Properties

Name Description
FilterInterval An integer that specifies an interval in milliseconds, in which the field's content is filtered.
Remarks: The default is 250
FilterMode A filter mode to apply. Supported values are ValidChars and InvalidChars. If the property is set to InvalidChars, FilterType must be set to Custom. ValidChars is default.
Remarks: If the property is set to ValidChars, FilterType must be set to Custom.
FilterType A filter type to apply that is specified as a comma-separated combination of the following values: Numbers, LowercaseLetters, UppercaseLetters, and Custom. Custom is default.
Remarks: If Custom is specified, the ValidChars property will be used in addition to other settings, such as Numbers.
InvalidChars A string that consists of all characters that are considered invalid for the text box when the field type is Custom.
Remarks: If the field type is not Custom, this property value is ignored.
ValidChars A string that consists of all characters that are considered valid for the text box when the field type is Custom.
Remarks: If the field type is not Custom, this property value is ignored.

Client properties

Name Description
filterInterval An interval in milliseconds, in which the field's content is filtered.
filterMode The Sys.Extended.UI.FilterModes object that specifies the mode to apply to a FilterTextBox instance.
filterType The Sys.Extended.UI.FilterTypes object to apply to a FilterTextBox instance.
invalidChars A string that consists of all characters that are considered invalid for the text box when the field type is Custom.
validChars A string that consists of all characters that are considered valid for the text box when the field type is Custom.

Client events

Name Description
filtered Fires when the TextBox is filtered.
processKey Fires when a key is processed.

Client properties

filterInterval

An interval in milliseconds, in which the field's content is filtered.

Getter name: get_filterInterval()
Setter name: set_filterInterval(value)

filterMode

The Sys.Extended.UI.FilterModes object that specifies the mode to apply to a FilterTextBox instance.

Remarks: Supported values are ValidChars and InvalidChars.

Getter name: get_filterMode()
Setter name: set_filterMode(value)

filterType

The Sys.Extended.UI.FilterTypes object to apply to a FilterTextBox instance.

Remarks: The filter type to apply can be a comma-separated combination of the following values: Numbers, LowercaseLetters, UppercaseLetters, and Custom. If Custom is specified, the ValidChars property will be used in addition to other settings, such as Numbers.

Getter name: get_filterType()
Setter name: set_filterType(value)

invalidChars

A string that consists of all characters that are considered invalid for the text box when the field type is Custom.

Remarks: If the field type is not Custom, this property value is ignored.

Getter name: get_invalidChars()
Setter name: set_invalidChars(value)

validChars

A string that consists of all characters that are considered valid for the text box when the field type is Custom.

Remarks: If the field type is not Custom, this property value is ignored.

Getter name: get_validChars()
Setter name: set_validChars(value)

Client events

filtered

Fires when the TextBox is filtered.

Add event handler method: add_filtered(handler)
Remove event handler method: remove_filtered(handler)
Raise event method: raise_filtered()

processKey

Fires when a key is processed.

Add event handler method: add_processKey(handler)
Remove event handler method: remove_processKey(handler)
Raise event method: raise_processKey()

Clone this wiki locally