Class Banana.Controls.MultiSelect
Extends
Banana.Controls.DropDown.
- Methods borrowed from class Banana.Controls.DropDown:
- getData, getOptGroupField, getPromptText, getTagName, setData, setDataByIndex, setOptGroupField, setPromptText
- Methods borrowed from class Banana.Controls.ListControl:
- dataSetSourceBind, getDataSource, setDataKeyField, setDataSource, setDataValueField
- Methods borrowed from class Banana.Controls.DataControl:
- dataSetBind, unDataSetBind, updateDisplay
- Methods borrowed from class Banana.UiControl:
- addControl, addCss, addCssClass, getAttribute, getAttributes, getClientId, getCss, getCssClass, getDimensions, getHtml, getHtmlAttributes, getState, getStyle, getStyleProperty, hasCssClass, registerEvents, removeAttribute, removeCssClass, removeState, setAttribute, setClientId, setCss, setEnabled, setState, setStyle, setVisible, switchCssClass, triggerEvent, unregisterEvents
- Methods borrowed from class Banana.Control:
- applyToChildren, bind, clear, createComponents, findControl, generateUniqueId, getControls, getDomEventTypes, getFirstUiControl, getId, getPage, getParent, getProxy, hasBind, invalidateDisplay, onPreInvalidateContents, onWindowResize, remove, render, setId, setPage, setParent, unbind, unload
Defined in: MultiSelect.js.
Class Detail
Banana.Controls.MultiSelect()
Creates a Multiselect.
Example:
var multiselect = new Banana.Controls.MultiSelect();
this.addControl(multiselect);
multiselect.setDataSource([1,2,3,4,5,6,7,8,9]);
multiselect.setData([5,6,2]);
///another way top populate datasource is with complex objects.
//by default complex objects should have a dataKeyField and dataValueField.
//where dataKeyField = key and dataValueField = value;
//To change this use setDataKeyField and setDataValueField.
multiselect.setDataSource([{key:1,value:'one'},{key:2,value:'two'}]);
multiselect.setData([2,4,6]);