$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Data Grid WinForms Control
Create data gird view in C# with modern user interface for your Windows Forms applications
Home > WinForms UI Controls > User Manual > ComboBox Column in C#

C# Grid ComboBox Column

The Kettic Grid ComboBox Column is able to show predefined candidate text values in a drop down list and offers a lookup into some static values. There are three key properties available to users using the Grid Combobox Column, the Data Source property, DisplayMember property, ValueMember property, FilterMode property, and DisplayMemberSort property. The Grid ComboBox Column descends all features of the Kettic Data Grid Column parent class.

Properties of Grid ComboBox Column

  • DataSource, this property is used to set the data source which stores values to select
  • ShowMember, this property is used to display the column of the DataSource in the drop down.
  • ValueMember, this property is used to update the cell of the column of the DataSource.
  • FilterMode, this property contains the DisplayMember and ValueMember values and determines if the column will be filtered or not.
  • ShowMemberSort, this property is used to sort the column

Data Binding Grid ComboBox Column in C#

GridComboBoxColumn supplierColumn = new GridComboBoxColumn();
supplierColumn.Name = "PorductsColumn";
supplierColumn.HeaderText = "Porducts";
supplierColumn.DataSource = this.porductsBindingSource;
supplierColumn.ValueMember = "PorductID";
supplierColumn.DisplayMember = "PorductName";
supplierColumn.FieldName = "PorductsID";
supplierColumn.Width = 150;

Binding ComboBox to Array of Strings

To bind the grid combobox to column with array of strings in the data source, we just use the DisplayMember and ValueMember value in the same way and set the array strings as a datasource to the combobox column.

Binding ComboBox to Collection of Custom Object

Moreover, we can bind the combobox to a collection of custom object. Normally, we need to set data source, which should be separate data source for each of combobox column, filled with some data and disable the auto generate value. Then create and map the data base columns using the grid control. We will set the string array as the data source for the first combox column and set a binding list for a second combo column.
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