Hi, I tried a lot of things and code i found here in the forum and in the documentations, but everything i found is for Jquery and it isnt working for .net core.
I have some checbkox to filter and show/hide the resources of my scheduler. The filtering is working, but i cant hide/show the selected/unselected resources.
Until the line 'scheduler.dataSource.filter(filter);' all is working fine, filtering the events. But i dont want to have the columns of the resources that arent selected... I found in a lot of topics that for that, i need the line 'scheduler.view(scheduler.view().name)' but is not working.
I found that for filter the datasource some people use 'scheduler.resources[0].dataSource.filter(filter);' but is not working for me, im using 'scheduler.dataSource.filter(filter)'.
How could i get that functionality? I need it... because i have a lot of 'medicos' resources and is impossible to visualize the scheduler with all.. i only need the selected ones.
Thanks in advance!
$("#medicosCheck :checkbox").change(function (e) {
var checked = $.map($("#medicosCheck :checked"), function (checkbox) {
return parseInt($(checkbox).val());
});
var filter = {
logic: "or",
filters: $.map(checked, function (value) {
return {
operator: "eq",
field: "IdMedico",
value: value
};
})
};
var scheduler = $("#citas").data("kendoScheduler");
scheduler.dataSource.filter(filter);
//scheduler.view(scheduler.view().name);
});