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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set the textbox as AutoSuggest in GridControl?

Platform: WinForms |
Control: GridControl |
Published Date: March 17, 2015 |
Last Revised Date: March 17, 2015

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

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.

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