ComboBox > Input > Element

Represents a <select /> input tag. ComboBoxes have child elements of type Option. It contains all fields, functions and properties of Input and Element. Adding and removing options automatically updates the DOM.

Constructors

ComboBox() Creates a select element.
ComboBox(String id) Creates a select element with the given id.

Declarative Attributes

bindtag Default: "false" If true, the object that’s bound to will be put in the Tag field of each Option during binding.
bindtext Default: "" If set, this value will be used as the property to pull from the object bound to the Option to set the Text.
bindvalue Default: "" If set, this value will be used as the property to pull from the object bound to the Option to set the Value.

Fields

Options OptionArray Collection of options found in the combo box.  

Events

OnSelectionChanged UserEventArgs Fired when the selected value changes.  

Property Functions

BindTag(Boolean bindTag) Boolean Gets or sets whether the object is set to the Tag field of an Option during binding.  
BindText(String text) String Gets or sets what property is used  on an object to pull the text of an Option from in binding.  
BindValue(String text) String Gets or sets what property is used on an object to pull the value of an Option from in binding.  
SelectedIndex(Number index) Number Gets or sets the selected index. No selection returns –1.  
SelectedOption(Option option) Option Gets or sets the selected option. No selection returns null.  
SelectedText(String text) String Gets or sets the selected text. No selection returns null.  
SelectValue(String value) String Gets or sets the selected value. No selection returns null.  

Binding

ComboBoxes can be bound to an array or dictionary. If a Dictionary is used, the Keys are used at the "Text" of each Option and the "Value" is used for the Value of each Option. BindTag indicates whether the bound object is attached to the Option’

Last edited Oct 31, 2011 at 12:29 AM by dahrkdaiz, version 4

Comments

No comments yet.