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.
Unfortunately, activation email could not send to your email. Please try again.

Combobox, auto-open

Thread ID:





58610 Mar 25,2007 09:04 PM Mar 26,2007 01:21 PM Windows Forms 1
Tags: GridControl
Tom Affholter
Asked On March 25, 2007 09:04 PM

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.



Administrator [Syncfusion]
Replied On March 26, 2007 01:21 PM

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
CType(Me.gridControl1.CurrentCell.Renderer.Control, TextBoxBase).SelectAll()
End If
End If
End Sub


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.