$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Multi-Column ComboBox Control
Render multiple string values for dropdown controls
Home > WinForms UI Controls > User Manual > Data Binding in C#

Multi-Column ComboBox Data Binding in C#.NET

Kettic Multi-Column ComboBox is capable of binding to data source and performs the editing, filtering, grouping and sorting operations. This control is a combobox component that combines the features and functionality of KetticComboBox control and KetticGridView control. This control integrates the Kettic GridView component into the drop-down of it. The drop-down element is an object of the KetticMultiColumnComboBoxElement and is capable of customizing the drop-down appearance, animation and changing the size of the combobox.

Bind Multi-Column ComboBox to Data at Design Time

It is really easy to bind the multiple columns combobox control to data by configure the DataSource property at design time. The databinding at design time is able to let the KetticGridVeiw within the Multi-Column ComboBox control automatically create columns for the fields in specified data source.

Data Binding using Columns Collection

This approach allows the users to customize columns list of your own by using the Columns collection editor of KetticGridView control within the Multi-Column ComboBox component. To access the collection editor, we need to go to the Columns of MasterGridViewTemplate in EditorControl of the MultiColumnComboBoxElement in Kettic Multi-Column ComboBox .NET component.

Binding the ComboBox to Data in C#.NET

Kettic Multi-Column ComboBox allows the users bind the control to data in C# code in C#.NET application. To bind the control using C# code, we need to turn off the auto-generation of columns. The C# below shows how to accomplish the databinding with ComboBox control.

protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);

NwindDataSet nwindDataSet = new NwindDataSet();
CustomersTableAdapter customersTableAdapter = new CustomersTableAdapter();
customersTableAdapter.Fill(nwindDataSet.Products);
this.ketticMultiColumnComboBox1.DataSource = nwindDataSet.Products;
foreach (GridViewDataColumn column in
this.ketticMultiColumnComboBox1.MultiColumnComboBoxElement.Columns)
{
column.BestFit();
}
}

void SetUpGrid()
{
KetticGridView gridViewControl = this.ketticMultiColumnComboBox1.EditorControl;
gridViewControl.MasterTemplate.AutoGenerateColumns = false;
gridViewControl.Columns.Add(new GridViewTextBoxColumn("ProductID"));
gridViewControl.Columns.Add(new GridViewTextBoxColumn("ProductName"));
gridViewControl.Columns.Add(new GridViewTextBoxColumn("Amount"));
gridViewControl.Columns.Add(new GridViewTextBoxColumn("Price"));
}
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls