Class wwWebListControl

The wwWebListControl class provides the base behavior for the ListBox and DropDownList controls. It implements nearly all of the features of both controls.

The list supports both DataSource binding for it's list content and ControlSource binding for the SelectedValue property by default.

Custom
  wwWebControl
    wwWebListControl

Class Members

MemberDescription

Change

Fires if AutoPostBack is set to .T. and you select a new item in the list.

AddControl

Allows adding of wwWebListItem controls.

o.AddControl(loCtl)

AddItem

Adds an item to the list control manually.

o.AddItem(lcText,lcValue,llSelected)

ClearItems

Clears all the items manually added to the control. Removes all items and clears the DataSource.

o.ClearItems()

DataBind

DataBind on a list control performs ControlSource binding only that sets the SelectedValue. List based binding occurs at Render() time.

o.DataBind()

DataSource

DataSource used to bind the list items to. The datasource must be a FoxPro cursor to table.

DataTextField

The field used for displaying the text of the list item.

DataValueField

The cursor/table field used for the value of the list item. If not provided the DataTextField value is used for the value.

FirstItemText

The FirstItemText property allows adding an item to the list at the very beginning.

FirstItemValue

The FirstItemValue property allows adding an item to the list at the very beginning and set its value.

Items

Name Value Collection of static list items that are either added through markup (<asp:listitem />) or by calling the AddItem() method explicitly.
Important: Databound items from the DataSource don't show up in the Items collection - these values are rendered directly from their datasource into HTML to reduce overhead.

LastItemText

Adds a last item and sets its text.

LastItemValue

Adds a last item and sets its value.

ListMode

Determines how this list is displayed either in DropDown or List mode.

SelectedValue

The text value of the currently selected item in the list control.

SelectedValues

A collection of selected values when the control is set to multiselect mode.

SelectionMode

Selection mode for listboxes and dropdowns which is either Single or Multiple.


© West Wind Technologies, 1996-2024 • Updated: 04/15/12
Comment or report problem with topic