When I set a filter on the datasource used by my autocomplete widget, the filter seems to be cleared the moment you search inside the autocomplete. Is there a way to override this functionality? I have a grid that I am filtering in several different ways and I want the autocomplete data to be updated to show these other filters. Code can be found below.
var ds = new kendo.data.DataSource({data: createRandomData(50)})
//create AutoComplete UI component
var autoComplete = $("#input").kendoAutoComplete({
dataSource: ds,
dataTextField: 'FirstName',
filter: "startswith",
placeholder: "Search by First Name..."
});
var grid = $('#grid').kendoGrid({
dataSource: ds,
columns: [
{field: 'FirstName', title: 'First Name'}
]
});
ds.filter([{ field: "FirstName", operator: "contains", value: "La" }]);
The filter I manualy add in is automatically removed the moment I begin typing inside the autocomplete where instead I want to simply add an additional filter using the autocomplete. Any help is appreciated.
Thanks
var ds = new kendo.data.DataSource({data: createRandomData(50)})
//create AutoComplete UI component
var autoComplete = $("#input").kendoAutoComplete({
dataSource: ds,
dataTextField: 'FirstName',
filter: "startswith",
placeholder: "Search by First Name..."
});
var grid = $('#grid').kendoGrid({
dataSource: ds,
columns: [
{field: 'FirstName', title: 'First Name'}
]
});
ds.filter([{ field: "FirstName", operator: "contains", value: "La" }]);
The filter I manualy add in is automatically removed the moment I begin typing inside the autocomplete where instead I want to simply add an additional filter using the autocomplete. Any help is appreciated.
Thanks