In love with Kendo UI but not with refresh which does not fire.
We tried different methods without success
Inside an ascx UserControl this is our code:
<div style="width:1100px;margin:40px 0 100px 0;text-align:center">
<input id="comboboxWarrantyClients" style="width:200px" />
<br /><br />
<div id="button">Refresh the autocomplete !</div>
</div>
<script type="text/javascript">
var kendoAutoCompleteWC = null;
$(document).ready(function () {
kendoAutoCompleteWC = $("#comboboxWarrantyClients").kendoAutoComplete({
dataTextField: "FullName",
dataValueField: "ID",
dataSource: [{"ID":1,"FullName":"John"}],
filter: "contains",
placeholder: "Select"
});
});
$('#button').click(function () {
kendoAutoCompleteWC.dataSource = [{"ID":1,"FullName":"John"},{"ID":2,"FullName":"Nathalie"}];
kendoAutoCompleteWC.refresh();
});
Can someone has the trick to make it work, please ?
In this case, we get an error "kendoAutoCompleteWC.refresh(); is not a function..."
Thanks so much by advance...
Jean Yves
We tried different methods without success
Inside an ascx UserControl this is our code:
<div style="width:1100px;margin:40px 0 100px 0;text-align:center">
<input id="comboboxWarrantyClients" style="width:200px" />
<br /><br />
<div id="button">Refresh the autocomplete !</div>
</div>
<script type="text/javascript">
var kendoAutoCompleteWC = null;
$(document).ready(function () {
kendoAutoCompleteWC = $("#comboboxWarrantyClients").kendoAutoComplete({
dataTextField: "FullName",
dataValueField: "ID",
dataSource: [{"ID":1,"FullName":"John"}],
filter: "contains",
placeholder: "Select"
});
});
$('#button').click(function () {
kendoAutoCompleteWC.dataSource = [{"ID":1,"FullName":"John"},{"ID":2,"FullName":"Nathalie"}];
kendoAutoCompleteWC.refresh();
});
Can someone has the trick to make it work, please ?
In this case, we get an error "kendoAutoCompleteWC.refresh(); is not a function..."
Thanks so much by advance...
Jean Yves