The following example demonstrates how to bind the WinComboBox to a dataset filled by
an ADO data adapter:
Imports Xceed.Editors
Imports System.Data.OleDb
Dim connectionString As String = "" 'connection query
Dim connection As New OleDbConnection( connectionString )
connection.Open()
Dim selectQuery As String = "SELECT * FROM Clients"
Dim dataAdapter As New OleDbDataAdapter( selectQuery, connection )
Dim dataSet As New DataSet( "Clients" )
dataAdapter.Fill( dataSet )
winComboBox1.SetDataBinding( dataSet, "Clients" )
using Xceed.Editors;
using System.Data.OleDb;
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 );
winComboBox1.SetDataBinding( dataSet, "Clients" );
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2