Example:
function GetCustomerList_Callback(Result) { var DataTable = Result; // *** Attach to the lstCustomerList control var List = new wwList("lstCustomerList"); List.clear(); var SelectedValue = List.control.selectedValue; List.dataValueField = "CustomerId"; List.dataTextField = "CompanyName"; List.setData(DataTable); }
Member | Description | |
---|---|---|
addItem | Adds an item to the list. o.wwList.addItem(Text,Value) | |
clear | Clears the content of the list. o.wwList.clear() | |
selectAll | Allows selection or unselection of all items in the list element. o.wwList.selectAll(unselect) | |
selectItem | Selects a list item to the specified value. o.wwList.selectItem(value) | |
setData | Provides databinding to an array or DataTable object. Simply pass in either items and they are assigned to the list by creating new list items. o.wwList.setData(Items,NoClear) | |
dataTextField | The text field that is used for databinding in the setData() method call. | |
dataValueField | The field/property used to populate the value of each listbox item when databinding with setData(). |