How to detect if text typed in not a value from list

2 posts, 0 answers
  1. Jon
    Jon avatar
    51 posts
    Member since:
    Oct 2013

    Posted 27 Mar 2015 Link to this post

    I'd like to use autocomplete boxes set to text and limit to single entry. I have achieved this but I'm now trying to detect if the text entered is new. i.e. it is not an item that already exists in the database that populates the list.

    In my case the select statement is against a table with less than 100 records. New values are permitted. The user types and the dropdown is filtered. The user can then select from a value or carry-on typing.

    Can the control indicate
    1.  If the value has been selected or typed.
    2.  If typed then is this a new entry or an value that exists but was not selected.... sometimes our user will paste a value in directly which actually already exists in the list.

    I need to be able to differentiate so that new values are added to a table when the form is saved.


  2. Dimitar Terziev
    Dimitar Terziev avatar
    1266 posts

    Posted 01 Apr 2015 Link to this post

    Hello Jon,

    The RadAutoCompleteBox dose not keep track of the records displayed in the drop down, so it's up to the developer to check after the form is submitted whether the new entry is an existing one or should be inserted into the database.

    Dimitar Terziev

    See What's Next in App Development. Register for TelerikNEXT.

  3. DevCraft R3 2016 release webinar banner
Back to Top