Update databinding with each character typed

2 posts, 1 answers
  1. Alex Wu
    Alex Wu avatar
    31 posts
    Member since:
    Dec 2009

    Posted 11 Jan 2010 Link to this post

    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.
  2. Answer
    Valeri Hristov
    Valeri Hristov avatar
    2252 posts

    Posted 12 Jan 2010 Link to this post

    Hello Alex,

    I have a blog post that solves similar problem:

    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.
Back to Top