We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

AutoComplete Entered value must be in list

Thread ID:





118883 Apr 19,2015 10:53 AM UTC Apr 21,2015 10:10 AM UTC ASP.NET MVC 1
Tags: AutoComplete
peter hancock
Asked On April 19, 2015 10:53 AM UTC

In my auto complete I want the person to only be able to enter the values in the list.

    var data = [{"Disabled":false,"Group":null,"Selected":false,"Text":"Worsley Wigwams","Value":"5c2c1add-c1ca-43e5-9ce9-55a63c2052be"},{"Disabled":false,"Group":null,"Selected":false,"Text":"Peters Amazing Builders","Value":"d85fda94-0301-4eac-b8bf-5e5220cf1cfe"},{"Disabled":false,"Group":null,"Selected":false,"Text":"Hancocks Hammers","Value":"893ccd71-9af9-4f5b-9977-678ccc2a97f2"},{"Disabled":false,"Group":null,"Selected":false,"Text":"PH Services","Value":"eaba37db-54ad-4cc7-8b1b-6ab3e0e84447"},{"Disabled":false,"Group":null,"Selected":false,"Text":"Walkden Construction","Value":"1ebb1508-9336-478e-baf5-c4139507be3d"},{"Disabled":false,"Group":null,"Selected":false,"Text":"Little Hultons Little Builders","Value":"c471598c-485b-4ea0-b362-f4a46af70650"}];
    $(function () {
        var value = $('#Subcontractor_Description').val();
            dataSource: data,
            fields: { key: "Text", text: "Text" },
            highlightSearch: true,
            showRoundedCorner: true,
            value: value


Ezhil S [Syncfusion]
Replied On April 21, 2015 10:10 AM UTC

Hi Peter,

Thank you for contacting Syncfusion support.

Query: In my auto complete I want the person to only be able to enter the values in the list.
As per the query, do you want to restrict the user to type only the characters that are available in the list? That is you process each characters entered in the AutoComplete text box and compare it to the available suggestion list to restrict the next character to be typed in the input. For example with the shared code data source on typing “P” the next letter allowed to type for is either “E” or “H” and you will be disabled to enter other characters in the AutoComplete text box. If this is not your requirement on AutoComplete please describe us your query in detail so that we can provide you an appropriate solution ASAP.

Please let us know if you have any other queries.

Ezhil S


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon