Search KB Filter article types
ComboBox
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  
Title Update Author
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
11/Jan/2009    2009/01/11
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
06/Jan/2008    2008/01/06
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
12/Jan/2007    2007/01/12
Tags: Developers, Data Binding, Windows & Dialogs, 1. Beginner, 2. Intermediate, Customization, Data Binding, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
03/Jan/2009    2009/01/03
Tags: Architects, Developers, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
04/Dec/2010    2010/12/04
Tags: Developers, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
21/July/2010    2010/07/21
.NET HTML5 Web, Cloud and Mobile application delivery | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2012 Visual WebGui®       Visual WebGui weblog on ASP.NET Gizmox Blog Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS