)
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 show the combobox dropdown on entering a text in cell in WinForms GridGroupingControl?

Platform: WinForms |
Control: GridGroupingControl |
Published Date: June 29, 2016 |
Last Revised Date: December 24, 2019

Combobox customization

To show the ComboBox dropdown on entering the text in cell, TableControlCurrentCellKeyPress event can be used and CurrentCell.ShowDropDown property can be used in that event. The Autocomplete option can be enabled by using AutoCompleteInEditMode property.

C#

//Assigning the column cell types as GridListControl
this.gridGroupingControl1.TableDescriptor.Columns["Description"].Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.GridListControl;
 
//Enables Autocomplete
this.gridGroupingControl1.TableDescriptor.Columns["Description"].Appearance.AnyRecordFieldCell.AutoCompleteInEditMode = GridComboSelectionOptions.AutoSuggest;
 
//Triggering Event
this.gridGroupingControl1.TableControlCurrentCellKeyPress += gridGroupingControl1_TableControlCurrentCellKeyPress;
 
//Handling Event
void gridGroupingControl1_TableControlCurrentCellKeyPress(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlKeyPressEventArgs e)
{
   if (!e.TableControl.CurrentCell.IsDroppedDown)
   {
      e.TableControl.CurrentCell.ShowDropDown();
   }
}

 

VB

'Assigning the column cell types as GridListControl.          
Private Me.gridGroupingControl1.TableDescriptor.Columns("Description").Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.GridListControl
 
'Enables Autocomplete           
Private Me.gridGroupingControl1.TableDescriptor.Columns("Description").Appearance.AnyRecordFieldCell.AutoCompleteInEditMode = GridComboSelectionOptions.AutoSuggest
 
'Triggering Event
Private Me.gridGroupingControl1.TableControlCurrentCellKeyPress += AddressOf gridGroupingControl1_TableControlCurrentCellKeyPress
 
'Handling Event
Private Sub gridGroupingControl1_TableControlCurrentCellKeyPress(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlKeyPressEventArgs)
   If Not e.TableControl.CurrentCell.IsDroppedDown Then
      e.TableControl.CurrentCell.ShowDropDown()
   End If
End Sub

 

Screenshot

Show the dropdown of combobox on entering text

Samples:

C#: ComboBox Dropdown CS

VB: ComboBox Dropdown VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

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