ComboBox fully supports binding to collections, tables and datasets.
Also ComboBox supports new .Net 2 feature - declarative datasources.
Simply make sure you populate your collection from your data-source and set the
DataSource property of ComboBox to the instance
of the the collection and call the DataBind() method. In addition, you can specify
the DataTextField and DataValueField of the data-source
using the respective ComboBox properties.
This sample demonstrates the working ComboBox with declarative
datasources. |