Categories: Selection
|
Tags: Architects, Developers, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
Revision: 1
Posted: 11/July/2009
Updated: 04/Dec/2010
Status: Publish
Types: Reference
|
This article will have a few sections added to it soon, based on the following article type skeleton: Control
Overview
The ComboBox control is functionally equivialent to the Windows Forms ComboBox control and it displays a text box combined with a listbox, which enables the user to select items from the list or enter a new value.
The list of available items to select from can be built manually through the Items collection, or by using the DataSource property and assigning a DataSource of some kind.
Availability
The ComboBox is one of the Out of the Box standard controls, which means it is free and available in all Visual WebGui versions.
Relevant membersProperties
Name
|
Description
|
Items
|
A collection of items to select from . When populating the control manually, you will use this collection to add your items.
|
DataSource
|
Any list that implements IListor IListSourceinterfaces. ArrayListbeing one of the typical lists that can be assigned here.
|
DisplayMember
|
When using DataSource, then property (field) within the DataSource that should display in the list of available values.
|
ValueMember
|
When using DataSource, then property (field) within the DataSource that represents the value of the currently selected item.
|
SelectedIndex
|
The sequential index of the currently selected item within it's source list (manual or DataSource)
|
SeletedItem
|
The currently selected item. The type of this property varies, depending on the type of datasource in use.
No DataSource nothing (use SelectedValue)
DataSource is DataTable System.Data.DataRowView
DataSource is BindingSource System.Data.DataRowView
DataSource is any other IList or IListSource An item from that datasource
|
SelectedValue
|
The value of the currently selected item. If using the ComboBox without DataSource, then simply the item from the manually populated list. If using DataSource, then the property from the DataSource set in the ValueMember property above (defaults to ToString() if not set).
|
Samples of use
Limitations and workarounds
RererencesArticles
Code samples
Forum discussons
Other references
- MSDN Windows Forms ComboBox documenation
- Bound to BindingSource ComboBox does not update it's bound source til you call EndEdit
About the author
Related Articles
Selection |
|
|
Tags: Developers, Data Binding, Navigation, 1. Beginner, 2. Intermediate, Data Binding, Navigation, ASP.NET, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
Control of a combobox with a checked list and a tree.
Tags: Developers, Navigation, 2. Intermediate, 3. Advanced, Customization, Layouting, Navigation, Pre v6.3, v6.3, v6.4 and Later
|
|
|
This code demonstrates the usage of the different AutoCompleteMode values property of ComboBox control
Tags: Developers, Data Binding, Navigation, 1. Beginner, 2. Intermediate, 3. Advanced, Navigation, Pre v6.3, v6.3, v6.4 and Later
|
|
|
Tags: Developers, Data Binding, Windows & Dialogs, 1. Beginner, 2. Intermediate, Customization, Data Binding, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
Tags: Architects, Developers, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
|
|
|
Tags: Developers, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
|