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.

How to set the textbox as AutoSuggest in GridControl?

Description

There is no direct support for AutoSuggest in TextBox cell. ComboBox cell only contains AutoSuggest support. Therefore, to make a textbox cell as AutoSuggest textbox, modify the ComboBox cell to work like TextBox cell.

Solution

You can change the appearance of combo box cell like text box cell by disabling the dropdown button using the ShowButtons property. You can achieve AutoSuggest textbox by setting the AutoCompleteInEditMode property. By default, the suggested items can be dropped down while pressing the dropdown button of ComboBox. Hence, you can display the dropdown items while entering the text by handling the CurrentCellKeyPress event.

In the provided sample, 2nd row 1st column is set as AutoSuggest textbox.

C#

VB

The following screenshot illustrates the output.

Figure 1: AutoSuggest TextBox

Sample

C#: AutoSuggest_CS

VB: AutoSuggest_VB

Article ID: Published Date: Last Revised Date: Platform: Control:
4305 03/17/2015 03/17/2015 Windows Forms GridControl
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.