ComponentOne Input for ASP.NET AJAX: Client-Side Functionality > Client-Side Methods

Client-Side Methods

ComponentOne Input for ASP.NET AJAX includes a rich client-side object model in which several properties can be set on the client side.

The following table lists the object methods available from client-side script:

 

Property

Client-Side Equivalent Methods

Description

AllowPromptAsInput

set_AllowPromptAsInput

get_AllowPromptAsInput

Gets or sets a value indicating whether PromptChar can be entered as valid data by the user.

BackColor

get_BackColor, set_BackColor(value)

Gets or sets the background.

BorderStyle

get_BorderStyle, set_BorderStyle(value)

Gets or sets the style of the border.

BorderWidth

get_BorderWidth, set_BorderWidth(value)

Gets or sets the width of the border.

CssClass

get_CssClass, set_CssClass(value)

CSS class name applied to the control.

Culture

set_CultureInfo, get_CultureInfo(value)

Gets or sets information about a specific culture.

DateFormat

get_DateFormat, set_DateFormat(value)

Gets or sets the date format pattern.

DecimalPlaces

get_DecimalPlaces, set_DecimalPlaces(value)

Indicates the number of decimal places to display.

ForeColor

get_ForeColor, set_ForeColor(value)

Color of the text within the control.

HideEnter

set_HideEnter, get_HideEnter(value)

If True then disable browser response on ENTER key.

HidePromptOnLeave

set_HidePromptOnLeave, get_HidePromptOnLeave(value)

Gets or sets a value indicating whether the prompt characters in the input mask are hidden when the masked text box loses focus.

Increment

get_increment(), set_increment(aIntVal)

Gets or sets how much to increase/decrease value with up/down buttons.

InvalidInputColor

set_InvalidInputColor, get_InvalidInputColor(value)

Gets or sets the color used to identify invalid input. Property omitted if the color is Empty.

Mask

set_Mask, get_Mask(value)

Gets or sets the input mask to use at run time. Mask must be a string composed of one or more of the masking elements, enumeration parts or numeric ranges.

MinValue

get_MinValue, set_MinValue(value)

Minimum value that can be entered.

MaxValue

get_MaxValue, set_MaxValue(value)

Maximum value that can be entered.

PasswordChar

set_PasswordChar, get_PasswordChar(value)

Gets or sets the character to be substituted for the actual input characters.

PromptChar

set_PromptChar, get_PromptChar(value)

Gets or sets the character used to represent the absence of user input in the control.

ResetOnPrompt

set_ResetOnPrompt, get_ResetOnPrompt(value)

Specifies whether to reset and skip the current position if editable, when the input character has the same value as the prompt.

ResetOnSpace

set_ResetOnSpace, get_ResetOnSpace(value)

Specifies whether to reset and skip the current position if editable, when the input is the space character.

ShowHintForEnumParts

set_ShowHintForEnumParts, get_ShowHintForEnumParts(value)

Specifies whether to show hint with list of available enumeration values for enumeration parts in mask. For example, for <<Sun|Mon|Tue>>.

SkipLiterals

set_SkipLiterals, get_SkipLiterals(value)

Specifies whether to skip current position if non-editable and the input character has the same value as the literal at that position.

Text

set_Text, get_Text(value)

Gets or sets the text as it is currently displayed to the user.

TextAlign

get_TextAlign, set_TextAlign(value)

Alignment of text in input box.

TextWithPrompts

get_TextWithPrompts(value)

Gets the text input by the user as well as any instances of the prompt character.

TextWithLiterals

get_TextWithLiterals(value)

Gets the text input by the user as well as any literal characters defined in the mask.

TextWithPromptAndLiterals

get_TextWithPromptAndLiterals(value)

Gets the text input by the user as well as any literal characters defined in the mask and any instances of the prompt character.

ThousandsSeparator

get_ThousandsSeparator, set_ThousandsSeparator(value)

Indicates whether the thousands group separator will be inserted between every three decimal digits (number of digits in thousands group depends on the selected culture).

ToolTip

get_ToolTip, set_ToolTip(value)

The ToolTip displayed when the mouse is over the control.

UseSystemPasswordChar

get_UseSystemPasswordChar, set_UseSystemPasswordChar

Indicates if the displayable text in the control should appear as the default password character.

Value

get_Value, set_Value(value)

The Numeric value.

 

The following table lists methods of the client-side object:

Client-Side Method

Description

clearComboItems

Clear combo items objects.

getInputElement

Returns HTML input elements

selectText(begIndex, [endIndex])

Select text in input box by index. If second parameter 'endIndex' is omitted, set caret position to new index.

setComboItems

Sets an array of combo items objects.

setComboListWidth(width)

Sets the width of the drop-down list.

setMaxComboListHeight(height)

Sets the maximum height of the drop-down list.

 

For information about these client-side methods and what properties can be set on the client side, see the C1MaskedInput client-side reference section of this documentation.


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.