I'm kind of new to JQuery, Json, MVC and all so my problem is probably simple to fix but for some reason, I can't seems to find the answer.
I'm trying to use the Kendo DropDownList to call an MVC action that takes a parameters and sends a query to an ElasticSearch server. So far I have this code :
$('#myInput').kendoDropDownList({
template: $("#inputTemplate").html(),
dataValueField: 'Id',
dataTextField: 'FullName',
filter: 'contains',
minLength: 3,
dataSource: {
serverFiltering: true,
transport: {
read: {
url: '@(Url.Action("ElasticSearch", "Participant"))',
dataType: 'json',
contentType:'application/json; charset=utf-8',
data: {
critere: 'bob'
}
}
}
}
});
This is actually working .... if I only want to search for "bob". But I can't figure out how to send the text from the seach field in the dropdownlist each time that I type something.
What am I missing here?