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

Update databinding with each character typed

1 Answer 70 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Alex Wu
Top achievements
Rank 1
Alex Wu asked on 12 Jan 2010, 04:42 AM
I have a collection of over 2000 records that needs to be displayed in a combobox but due to it's size I can't load all 2000+ records. So I am implementing in a way that each time a character is typed in the combobox Text I requery the database with .StartsWith and take the first 10 matching records and use the result to bind the combobox. Everything is working well until when all characters match, then the combobox Text reset itself to blank. For example:

I have a list of airports in US. I type J and it gives me 10 airports starting with J, JF gives me 10 airports starting with JF. If I type JFK then there is only one matching airport and combobox contains only JFK, but the Text of the combobox resets to blank. I need ti to selected JFK instead.

Or better yet, if there is a solution for binding a large collection of data then the built in autocomplete functionality would solve the problem.

1 Answer, 1 is accepted

Sort by
0
Accepted
Valeri Hristov
Telerik team
answered on 12 Jan 2010, 07:28 AM
Hello Alex,

I have a blog post that solves similar problem:
http://blogs.telerik.com/valerihristov/posts/08-12-04/auto-complete_combobox_with_wcf_service_and_radcontrols_for_silverlight.aspx

I hope that the sample application will work for you.

All the best,
Valeri Hristov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ComboBox
Asked by
Alex Wu
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Share this question
or