)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to add ComboBox for particular column in WinForms GridGroupingControl?

Platform: WinForms |
Control: GridGroupingControl |
Published Date: April 15, 2016 |
Last Revised Date: February 12, 2020
Tags: celltype, columns

Add combobox for particular column

In order to have a combo box in a specified column in GridGroupingControl, the required column name should be assigned the cell type as ComboBox. This can be done by changing the column’s Appearance through the TableDescriptor property.

C#

// form()
// Specify the Column name to add the combo box.
this.gridGroupingControl1.TableDescriptor.Columns["CategoryID"].Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.ComboBox;
 
StringCollection list = new StringCollection();
list.Add("Quartz");
list.Add("Ruby");
list.Add("Saphire");
list.Add("Emerald");
list.Add("Diamond");
list.Add("Graphite");
 
// Specify the required list to be displayed in the drop down.
this.gridGroupingControl1.TableDescriptor.Columns["Description"].Appearance.AnyRecordFieldCell.
ChoiceList = list;

VB

‘Form()
' Specify the Column name to add the combo box.
Me.gridGroupingControl1.TableDescriptor.Columns("Description").Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.ComboBox
 
Dim list As New StringCollection() 
list.Add("Quartz")
list.Add("Ruby")
list.Add("Saphire")
list.Add("Emerald")
list.Add("Diamond")
list.Add("Graphite")
 
' Specify the required list to be displayed in the drop down.
Me.gridGroupingControl1.TableDescriptor.Columns("Description").Appearance. AnyRecordFieldCell.ChoiceList = list

Screenshot

Show the combobox added to specific column

Samples:

C#: ComboBox_CS

VB: ComboBox_VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment
Comments
Bittu Dwivedi
Sep 26, 2019

how to do same for griddatabound control or sfdatagrid .

Reply

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon