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.

TextBox with Multi Column Autocomplete

Thread ID:

Created:

Updated:

Platform:

Replies:

119820 Aug 4,2015 11:49 PM Aug 6,2015 12:42 AM Windows Forms 3
loading
Tags: AutoComplete
Michael K
Asked On August 4, 2015 11:49 PM

Dear Sir :

Good day, today, I'm try to bind DataTable to AutoComplete 
This table have 3 column.
From my code :

Dim cpAutoComplete as new Syncfusion.Windows.Forms.Tools.AutoComplete
cpAutoComplete.DataSource = dtTable ' DataTable with 3 columns
cpAutoComplete,RefreshColumns()
cpAutoComplete,Item(0).Visable = false ' Hidden primary key
cpAutoComplete,Item(1).ColumnHeaderText= "Code"
cpAutoComplete,Item(2).ColumnHeaderText= "Name"

Therefore have a textboxext name TxtName autocomplete link to above object

My question is , how to display the text of column 3 in textboxext  textbox  (i.e. "Name" column), when user match or select item from popup autocomplete list

Thanks

Michael





Senthil Kumaran Rajan [Syncfusion]
Replied On August 5, 2015 03:15 AM

Hi Michael,

Thank you for using Syncfusion products.

In AutoComplete, this reported requirement can be achieved by using its property named MatchingColumn. Please make use of the below code snippet.

MatchingColumn:

This property will define Column that will be used by the AutoComplete control to perform matching with the current content (at runtime) of the target control.

Code Snippet[C#]:

//To display the Fourth column in TextBoxtExt

this.autoComplete1.Columns[3].MatchingColumn = true;


We have also prepared the sample for your reference and it can be downloaded from the below location.

Sample Location : http://www.syncfusion.com/downloads/support/forum/119820/ze/AutoCompleteTextBoxExt-319099742

Please let us know if you need further assistance.

Regards,
Senthil

Michael K
Replied On August 5, 2015 06:02 AM

Hi Senthil:

Thanks for your help, base on you provide sample, I  try to add the below code, it will not work.
 
            this.autoComplete1.RefreshColumns();
            //To display the Fourth column in TextBoxtExt
            // modify
            this.autoComplete1.Columns[0].ColumnHeaderText = "test0";
           this.autoComplete1.Columns[1].ColumnHeaderText = "test1";
            this.autoComplete1.Columns[2].ColumnHeaderText = "test2";
            this.autoComplete1.Columns[3].ColumnHeaderText = "test3";
That's mean if I assign columnheadertext, it will only return the first column value in textBoxExt1
Is this a problem ?

Thanks
Michael


Senthil Kumaran Rajan [Syncfusion]
Replied On August 6, 2015 12:42 AM

Hi Michael,

We considered this behavior with AutoComplete as bug and a support incident has been created under your account, to track the status of this requirement. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents

Regards,
Senthil

CONFIRMATION

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.

;