Client Class wwList

Provides a thin abstraction for a SELECT list that works for list boxes and drop down lists. Provides the ability to add items, clear the list and perform databinding to object arrays and DataTables returned from the server.

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); }


wwControl
  wwList

Class Members

MemberDescription
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().

Requirements

See also:

Class wwList

  Last Updated: 10/9/2007 | © West Wind Technologies, 2008