This is a migrated thread and some comments may be shown as answers.

How to use AutoCompleteBox in a Formview

1 Answer 79 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Fabio
Top achievements
Rank 1
Fabio asked on 19 Jun 2018, 10:27 AM

I spent hours trying to figure out how possibly bind this control to a datasource in a formview through a property.

Text does absolutely nothing.

Radcombobox use the Selectedvalue property. How am I supposed to use AutoComplete to load the value from the DB and Set it when I trigger the Update command?
I can't see anithing about it in the docs.

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 22 Jun 2018, 11:08 AM
Hello Fabio,

I am sharing the answer from the duplicated support ticket: 

The AutoCompleteBox is designed mainly for user interaction and handling a large amount of data. That is why there is no direct way to bind the AutoCompleteBox entries via a property similar to the ComboBox. 

Nevertheless, you can create the Entries manually in the ItemDataBound event of the Grid as demonstrated in the RadAutoCompleteTextBox bind in Template edit form forum thread.

In the update command, you can access the Entries collection of the AutoCompleteBox and save the values to the DataBase. The AutoCompleteBox - Add/Remove Tokens demo shows how to manipulate the Entries collection of the AutoCompleteBox.

Also, you might find the following article useful - DataSource not set error thrown when data source is provided in ItemDataBound.

Regards,
Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
AutoCompleteBox
Asked by
Fabio
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or