Hello community, how are you?
I need to replicate a filter like the one in this image. This is inside a kendoGrid filter, but I can't replicate something similar with MultiSelect and CheckboxGroup.
Supposedly this function is what makes this filter look like that:
function categoryDropdownEditor(container, options) {
$('<input required data-bind="value:' + options.field + '"/>')
.appendTo(container)
.kendoDropDownList({
dataSource: fk_categoriesDatasource,
dataTextField: "category",
dataValueField: "id",
filter: "contains",
minLength: 1
});
}
My kendoGrid is configured like this:
$("#grid").kendoGrid({
dataSource: dataSourceGrid,
autoBind: true,
scrollable: true,
sortable: true,
filterable: true,
groupable: true,
resizable: false,
loaderType: "skeleton",
pageable: {
refresh: true,
numeric: false,
input: true,
previousNext: true,
alwaysVisible: true
},
noRecords: {
template: function (e) {
return "No hay datos disponibles.";
}
},
columns: [
{
title: "CategorÃa",
field: "category_id",
dataTextField: "category",
dataValueField: "id",
editor: categoryDropdownEditor,
filterable: {multi: true},
dataSource: {
transport: {
read: {
url: apibaseurl + endpoint + "/categories",
type: "GET",
dataType: "json",
beforeSend: addToken,
},
},
schema: {
data: "data",
total: "total",
model: {
id: "id",
fields: {
category: {type: 'string'},
}
}
},
},
},
{
command: [
"edit",
{
name: " ",
iconClass: "k-icon k-i-more-vertical",
}
],
title: " ",
width: 210
}],
editable: "popup",
});
I apologize if it is not understood or if I forgot to put something, it is my first post here.
Thank you very much for your attention.
Jonathan.