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 with URL datasource doesn't work

Thread ID:





130082 Apr 20,2017 11:04 AM UTC Apr 24,2017 09:21 AM UTC ASP.NET MVC 3
Tags: AutoComplete
Asked On April 20, 2017 11:04 AM UTC


I'm testing binding an  autocomplete control with url adaptor, but I can not make it work.

Binding with viewbag works perfectly.

I attach an example

Attachment: AutocompleteExample_731f978c.zip

Selvamani Sankarappan [Syncfusion]
Replied On April 21, 2017 09:46 AM UTC

Hi Manolo,   
We have checked your shared sample, but we were unable to reproduce the reported issue. The data is bounded to the Autocomplete using the URL Adaptor and it is working in your shared sample. Please refer to the following video:   
If you still face any difficulties, kindly get back to us with more details to reproduce the issue. We will provide an appropriate solution at the earliest.   
Selvamani S.   

Replied On April 21, 2017 10:07 AM UTC


In my example, when I use autocomplete with datasource binding with the viewbag, it works fine

But when I use URL Adaptor, I get this

I'm filtergin for Au, but it show all data

Selvamani Sankarappan [Syncfusion]
Replied On April 24, 2017 09:21 AM UTC

Hi Manolo,   
Thanks for the update.   
If data is bound to Autocomplete using URL Adaptor, the URL Adaptor fetches all data. So, you need to filter the text manually using our existing client side event change of Autocomplete. Refer to the following code example:   
public JsonResult GetDataCar(string data)   
            var data1 = GetData();   
            if (data != null)   
                var search = from n in data1 wheren.text.ToLower().StartsWith(data.ToLower()) select n;   
                return Json(search,JsonRequestBehavior.AllowGet);   
                return Json(data1,JsonRequestBehavior.AllowGet);    
<div class="control">   
            <span class="txt">URL Adaptor - No work</span>   
            @Html.EJ().Autocomplete("delimit2").Datasource(ds => ds.URL(Url.Action("GetDataCar","Autocomplete")).Offline(true).Adaptor(AdaptorType.UrlAdaptor)).Width("225").MultiSelectMode(MultiSelectModeTypes.Delimiter).ShowPopupButton(true).Delimiter(",").EnableRTL(false).ClientSideEvents(e=>e.Change("change"))   
function change(args) {   
                url: "GetDataCar",   
                data: { data: args.value },   
                type: 'POST',   
                dataType: "json",   
                success: function(result) {   
                    console.log("event triggered");   
We have modified your sample based on your requirement. Refer to the following sample:   
Please let us know if you need further assistance.   
Selvamani 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

or the page will be automatically redirected to 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