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.
Class Members
Member | Description | |
---|---|---|
![]() |
Change | Fires if AutoPostBack is set to .T. and you select a new item in the list. A typical setup looks like this in the Page (using a wwWebListbox concrete instance): ```html ``` On the server you then… |
![]() |
AddControl | Allows adding of wwWebListItem controls. Used by the script manager to add ListItems from Script Pages.
o.AddControl(loCtl)
|
![]() |
AddItem | Adds an item to the list control manually. If the control has a Cursor DataSource set the Added items are appended at the end.
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. This is very useful for common list scenarios where you need to have things like: * ** Please select a State as… |
![]() |
FirstItemValue | The FirstItemValue property allows adding an item to the list at the very beginning and set its value. This is very useful for common list scenarios where you need to have things like: * ** Please… |
![]() |
Items | Name Value Collection of static list items that are either added through markup () or by calling the AddItem() method explicitly. **Important:** Databound items from the DataSource don't show up in… |
![]() |
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. Integer values are used: 1 - DropDown 2 - List |
![]() |
SelectedValue | The text value of the currently selected item in the list control. Note that this reflects the Value property of the control - you can read the value on a POSTBACK or set it at anytime during the… |
![]() |
SelectedValues | A collection of selected values when the control is set to multiselect mode. You can check for the number of selected values like this: ```foxpro IF this.lstChoices.Count > 0 FOR lnX = 1 to… |
![]() |
SelectionMode | Selection mode for listboxes and dropdowns which is either Single or Multiple. Possible values: * Single * Multiple You can use the SelectedValue and SelectedValues properties to get and set the… |
© West Wind Technologies, 2025 • Updated: 2025-03-12
Comment or report problem with topic