BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
$('#selectCar').ejAutocomplete({ dataSource: carList, minCharacter: 3 |
Please refer to the below link for the solution:
JS Playground Link: http://jsplayground.syncfusion.com/ucead2ml
If you want to know how to get started about our components, please check the below link:
http://help.syncfusion.com/js/overview
You could also find all the samples of our components in the following link location:
http://js.syncfusion.com/demos/web/
Regards,
Saravanan A J
Hi Baner,
We suggest you to avoid populating the autocomplete with more data directly. So to use such large database, we can use the Datamanager object on the controller side to filter out the data based on the typed character and then pass the Json result to the view page.
Please refer the following code snippet.
@Html.EJ().Autocomplete("stateSelect").Width("205").Datasource(d => d.URL("/home/getdata").Offline(false).Adaptor("UrlAdaptor")).Query("ej.Query()").AutocompleteFields(f => f.Text("dataValue").Key("index")).WatermarkText("Select a Value").MinCharacter(2) |
public JsonResult getdata(DataManager dm) { List<Sample> sampledata = new List<Sample>(); for (var i = 1; i <= 350000; i++) { if (i > 0 && i <= 40000) { sampledata.Add(new Sample { index = "s" + i, dataValue = "avalue" + i }); } else if (i > 40000 && i <= 80000) { sampledata.Add(new Sample { index = "s" + i, dataValue = "bvalue" + i }); } /*....*/ } //here you need to filter the data based on the character typed string r = dm.Where[0].value.ToString(); var searchResult = from n in sampledata where n.dataValue.StartsWith(r) select n; return Json(searchResult, JsonRequestBehavior.AllowGet); } |
We have attached the sample for your convenience, please check the following link.
http://www.syncfusion.com/downloads/support/forum/120874/ze/Autocomplete_Sample633130584
If still you face difficulties, please revert back the provided sample to showcase the issue, or please provide screenshot or video to showcase the issue which would be helpful for us to investigate further and provide you the exact solution.
Regards,
Francis Paul A