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

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

1 Answer 83 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 27 Mar 2015, 12:25 PM

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.

Thanks

1 Answer, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 01 Apr 2015, 07:19 AM
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.

Regards,
Dimitar Terziev
Telerik
 

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

 
Tags
AutoCompleteBox
Asked by
Jon
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Share this question
or