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. Image for the cookie policy date

Combobox, auto-open

VB.Net 2003
ES 3.3

I have a grid with a bound editable combobox. Currently, as the user types in the cbo, the list element matching those characters displays. When the user types in the combobox, can I have the combobox open with matches automatically. Currently the user must press the cbo button.

Thanks,

Tom

1 Reply

AD Administrator Syncfusion Team March 26, 2007 05:21 PM UTC

Try setting the DropDownStyle property on the cell's style to Autocomplete. This should enable the autocomplete behavior you mentioned. To get the combobox to autodrop when you start to type, try using the CurentCellKeyPress event.


gridControl1(rowIndex, 3).DropDownStyle = GridDropDownStyle.AutoComplete


Private Sub gridControl1_CurrentCellKeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles gridControl1.CurrentCellKeyPress
If Me.gridControl1.CurrentCell.Renderer.GetType().Equals(GetType(GridComboBoxCellRenderer)) Then
If Not Me.gridControl1.CurrentCell.IsDroppedDown Then
Me.gridControl1.CurrentCell.ShowDropDown()
CType(Me.gridControl1.CurrentCell.Renderer.Control, TextBoxBase).SelectAll()
End If
End If
End Sub

Loader.
Live Chat Icon For mobile
Up arrow icon