Xceed Grid for WinForms v4.3 Documentation
Creating a dataset using the OleDbDataAdapter class
Welcome to Xceed Grid for WinForms v4.3 > Basic Concepts > Editor Controls > WinComboBox control > Creating a dataset using the OleDbDataAdapter class

This topic describes the steps required to create a dataset using the OleDbDataAdapter class. 

For the purposes of all the examples found throughout the documentation, we will be using the various tables of the Access version of the Northwind database provided by Microsoft.

Basic steps

To create a dataset using the OleDbDataAdapter class, the following steps must be performed:

You are now ready to generate the dataset that will be used by the WinComboBox control:

In order for the combobox to be populated with data, the dataset must be filled. This is done by calling the Fill method of the OleDbDataAdapter object in, for example, a form's Load event: 

C# Copy Code
oleDbDataAdapter1.Fill( dataSet11 );
You can also create a data set manually, using the following code:
C# Copy Code

string connectionString = ""; //connection query

OleDbConnection connection = new OleDbConnection( connectionString );            

connection.Open();            

string selectQuery = "SELECT * FROM Clients";

OleDbDataAdapter dataAdapter = new OleDbDataAdapter( selectQuery, connection );

DataSet dataSet = new DataSet( "Clients" );            

dataAdapter.Fill( dataSet );