ComboBox - MikhailTymchukDX/AppVeyorTest GitHub Wiki

ComboBox (demo)

Like AutoCompleteExtender, a combo box is an ASP.NET AJAX control that combines the flexibility of the TextBox with a list of options from which users are able to choose.

Properties

Name Description
AutoCompleteMode Determines how the ComboBox automatically completes typed text. Remarks: When Suggest is specified, the ComboBox will show a list, highlight the first matched item, and if necessary, scroll the list to show the highlighted item. If Append is specified, the ComboBox will append the remainder of the first matched item to the user-typed text and highlight the appended text. When SuggestAppend is specified, both of the above behaviors are applied. If None (the default value) is specified, the ComboBox' auto-complete behaviors are disabled.
AutoPostBack Determines whether or not AutoPostBack should be used.
BackColor A background color.
BorderColor The ComboBox border color.
BorderStyle The ComboBox border style.
BorderWidth The ComboBox border width.
CaseSensitive Specifies whether or not user-typed text matches items in the list in a case-sensitive manner. The default is false.
DropDownStyle Determines whether or not a user is allowed to enter text that does not match an item in the list and if the list is always displayed. Remarks: If "DropDownList" is specified, users are not allowed to enter text that does not match an item in the list. When "DropDown" (the default value) is specified, any text is allowed. If "Simple" is specified, any text is allowed and the list is always displayed regardless of the AutoCompleteMode property value.
Enabled Determines whether or not the ComboBox is enabled.
Font The ComboBox control font.
ForeColor A foreground color.
Height ComboBox height.
ItemInsertLocation Determines if to "Append" or "Prepend" new items when they are inserted into the list or insert them in an "Ordinal" manner (alphabetically) based on the item Text or Value. The default is "Append"
ListItemHoverCssClass When specified, replaces default styles applied to highlighted items in the list with a custom css class.
MaxLength Specifies maximum length of the associated TextBox control.
RenderMode Specifies whether or not the ComboBox is rendered as an Inline or Block level HTML element. The default is Inline.
SelectedIndex The ComboBox selected item index.
TabIndex The ComboBox tab index.
Width ComboBox width.

Methods

RaisePostDataChangedEvent()

Raises PostDataChangeEvent.

RenderControl(writer)

Renders a control.

Params:

  • writer
    • Type:
    • Description: HTML text writer

ResolveControl(controlId)

Resolves a control

Params:

  • controlId
    • Type:
    • Description: ID of the control

Events

ItemInserted

Fires when an item is inserted.

ItemInserting

Fires on inserting an item.

Client properties

autoCompleteMode

Determines how the ComboBox automatically completes typed text.

Getter name: get_autoCompleteMode()

Setter name: set_autoCompleteMode(value)

autoPostBack

Determined whether or not to use AutoPostBack.

Getter name: get_autoPostBack()

Setter name: set_autoPostBack(value)

buttonControl

A Button control.

Getter name: get_buttonControl()

Setter name: set_buttonControl(value)

caseSensitive

Specifies whether user-typed text matches items in the list in a case-sensitive manner. The default is false.

Getter name: get_caseSensitive()

Setter name: set_caseSensitive(value)

comboTableControl

A ComboBox table control.

Getter name: get_comboTableControl()

Setter name: set_comboTableControl(value)

dropDownStyle

Determines whether or not a user is allowed to enter text that does not match an item in the list and if the list is always displayed.

Getter name: get_dropDownStyle()

Setter name: set_dropDownStyle(value)

hiddenFieldControl

A hidden field control.

Getter name: get_hiddenFieldControl()

Setter name: set_hiddenFieldControl(value)

listItemHoverCssClass

When specified, replaces the default styles applied to highlighted items in the list with a custom css class.

Getter name: get_listItemHoverCssClass()

Setter name: set_listItemHoverCssClass(value)

optionListControl

An OptionList control.

Getter name: get_optionListControl()

Setter name: set_optionListControl(value)

selectedIndex

The ComboBox selected item index.

Getter name: get_selectedIndex()

Setter name: set_selectedIndex(value)

textBoxControl

A TextBox control.

Getter name: get_textBoxControl()

Setter name: set_textBoxControl(value)

Client events

selectedIndexChanged

An event handler rised when selected index changed

Add event handler method: add_selectedIndexChanged(handler)

Remove event handler method: remove_selectedIndexChanged(handler)

Raise event method: raise_selectedIndexChanged()