Hi!
I have chosen to use ‘autocomplete’ with ajax.
But it does not work properly, I want to show me the data of a url and look like ‘autocomplete’.
Data in serviceDropdown:
[{“Id”:“A”,“otherdata”:null}, {“Id”:“B”,“otherdata”:null}, {“Id”:“C”,“otherdata”:null}]
I need the id to come out in ‘autocomplete’ and nothing else.
I try this, but doesn’t work:
cellProperties.source =
function (query, process) {
$.ajax({
url: serviceDropdown,
dataType: 'json',
data: {
query: query
},
success: function (response) {
for (var i = 0; i < response.length; i++) {
console.log("response: ", response[i].Id);
process += response[i].Id + ", ";
}
console.log(process);
return process;
}
});
};