Is it possible to specify a custom filter function?. I need to filter based on multiple fields of the objects.
Thank you
1 Answer, 1 is accepted
0
Martin Yankov
Telerik team
answered on 18 Feb 2014, 11:54 AM
Hello Heinrich,
Currently the AutoCompleteBox control allows filtering only by a single field. To accomplish your task you can merge the different fields into a single one with a separator and use the "contains" filter operation.
var autoComplete = new Telerik.UI.RadAutoCompleteBox(document.getElementById("autoCompleteBox"), {
dataSource: {
data: array
},
dataTextField: "searchField",
filter: "contains"
});
You can then use templates to display the item in the dropdown list properly.
I hope this information is useful. Let me know in case you need further assistance or have questions.
Regards,
Martin Yankov
Telerik
Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).