I have an autocomplete control to call server code to get databack, from the server response, I see the data is passed back correctly, however, it's not populating the list, it shows "loading" icon forver, any idea.
Here is how I configure
<input id="institutionAutoComplete"
data-role="autocomplete"
data-placeholder="Type an institution name "
data-min-length="4"
data-value-primitive="true"
data-text-field="Name"
data-bind="value: selectedInstitution,source: institutions" />
<br />
var degreeVm = kendo.observable($.extend({
institutions:new kendo.data.DataSource({
transport: {
read: {
url: '@Url.Content("~/CommonData/GetInstitutionList")',
data: {
name: function(){
return $("#institutionAutoComplete").data("kendoAutoComplete").value();
}
},
dataType: "jsonp"
}
},
schema: {
data:function(data) {
return data;
}
}
}),
},@(Html.ToJson(Model)))); Here is the data I received back from server
0: {Id:11, Name:The Ohio State University, InstitutionIdentifier:810, City:null, StateId:null,…}City: nullCountryId: 0Id: 11InstitutionIdentifier: "810"Name: "The Ohio State University"StateId: null
Here is how I configure
<input id="institutionAutoComplete"
data-role="autocomplete"
data-placeholder="Type an institution name "
data-min-length="4"
data-value-primitive="true"
data-text-field="Name"
data-bind="value: selectedInstitution,source: institutions" />
<br />
var degreeVm = kendo.observable($.extend({
institutions:new kendo.data.DataSource({
transport: {
read: {
url: '@Url.Content("~/CommonData/GetInstitutionList")',
data: {
name: function(){
return $("#institutionAutoComplete").data("kendoAutoComplete").value();
}
},
dataType: "jsonp"
}
},
schema: {
data:function(data) {
return data;
}
}
}),
},@(Html.ToJson(Model)))); Here is the data I received back from server
0: {Id:11, Name:The Ohio State University, InstitutionIdentifier:810, City:null, StateId:null,…}City: nullCountryId: 0Id: 11InstitutionIdentifier: "810"Name: "The Ohio State University"StateId: null