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

AutoComplete and database query

3 Answers 188 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
JMazeran
Top achievements
Rank 1
JMazeran asked on 25 Sep 2013, 12:12 PM
Hello,

We want to create an AutoComplete (or RadComboBox IsEditable=true) binded to a collection of 60.000 items so we would like that the control create the query in database (with like % for exemple) as to the user type the keyword and view the result in the choice popup of the combo

How to do this ?
Thx

3 Answers, 1 is accepted

Sort by
0
Rosen Vladimirov
Telerik team
answered on 30 Sep 2013, 08:36 AM
Hello,

I'm sending you a sample project demonstrating how you can use data from DB and Entity model in order to populate RadAutoCompleteBox with items. You can take a look at it and modify it based on your needs (I've used EntityFramework but if your needs require another approach, you can use it in the same manner in order to get the items and set them as ItemsSource of RadAutoCompleteBox).

Hopefully this helps.

Regards,
Rosen Vladimirov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Anthony
Top achievements
Rank 1
answered on 24 Aug 2014, 04:10 AM
How do you use the database in this example project? I tried to run it after installing EntityFramework, but it doesn't see the database. What do I have to do with it for the database to work? Do I need to install it in a SQL server instance?
0
Rosen Vladimirov
Telerik team
answered on 26 Aug 2014, 11:23 AM
Hello Anthony,

There's no need to put the database on SQL Server, it can be used as a LocalDB in Visual Studio. I'm sending my project again - I've made some small changes when getting items from DB (now items, that are already selected will not be included in the filtered result shown in the drop down) and I've added required EntityFramework dll to the project. You can try the new attachment and see if it works on your side (you'll have to add references to Telerik dlls).

Hope this helps.

Regards,
Rosen Vladimirov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
AutoCompleteBox
Asked by
JMazeran
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Anthony
Top achievements
Rank 1
Share this question
or