Here is my column definition
field: "SEARCHNAME", title: "Search Name", hidden: false, filterable: {
cell: {
minLength: 3,
operator: "contains",
template: uiFilter,
},
}
and here is the template function I'm trying to use
function uiFilter(args) {
debugger;
args.element.kendoAutoComplete({
datasource: getAllRecordsForFieldValue(ServiceURL, "TableName", "SEARCHNAME", args.element.val()),
datatextfield: "fieldval",
datavaluefield: "fieldval",
minlength: 2,
//valueprimitive: false
});
args.element.css("width", "90%").addClass("k-textbox").keydown(function (e) {
setTimeout(function () {
var inp = String.fromCharCode(e.keyCode);
if (/[a-zA-Z0-9-_ ]/.test(inp)) {
var eTarget = $(e.target).data("kendoAutoComplete");
eTarget.dataSource = getAllRecordsForFieldValue(ServiceURL, "TableName", "SEARCHNAME", e.target.value);
//$(e.target).trigger("change");
}
});
});
};
getAllRecordsForFieldValue is my service call, and I can see that the call is taking place properly and returning the expected values, but the autocomplete doesn't display any values suggestion