How to populate a combo box from a dataset in VB.Net
The DataSet consists of a collection of DataTable objects that you can relate to each other with DataRelation objects. The VB.Net SqlDataAdapter object allows us to populate Data Tables in a DataSet. Also we can populate a combo box from a dataset values.
Bind data source to ComboBox
Select Item from ComboBox
The following VB.Net program fetch the values from database and store it in a dataset and later bind to a combobox.
Binding a ComboBox to an Enum in VB.Net
Enum provide a better way in which to create a group of related constants that can be grouped as strings or integer values. When these values are bind to a ComboBox, the end user can select an option directly from a list of the Enum strings.
Data Binding an Enum with Descriptions
The follwoing VB.Net program bind a combobox with Enum values.
Bind a ComboBox to a generic Dictionary in VB.Net
A Dictionary class is a data structure that represents a collection of keys and values pair of data. The key is identical in a key-value pair and it can have at most one value in the dictionary, but a value can be associated with many different keys.
Dictionary as a Combobox Datasource
The following VB.Net program populating a Combobox from a Dictionary .
- What is ADO.NET Dataset
- How to Dataset with Sql Server
- How to Dataset with OLEDB Data Source
- Search Tables in a Dataset Sql Server
- Search Tables in a Dataset OLEDB Data Source
- Dataset table row count in SQL Server
- Dataset table row count - OLEDB Data Source
- How to find column definition - Sql Server
- How to find column definition - OLEDB Data Source
- How to create DataSet without Databse
- How to multiple tables in Dataset - Sql Server
- How to multiple tables in Dataset - OLEDB Data Source
- How to add relations between tables in a Dataset
- How to merge tables in a Dataset - Sql Server
- How to merge tables in a Dataset - OLEDB Data Source
- how many tables exist in a database - VB.NET