Hello everybody,
First of all, excuse my low English level.
In the scheduler I have added resources with check boxes like the basic usage demo. Also a group for these resources (each attendee is a group), and you can to hide the group when you uncheck the resource (filtering the resources).
I have problems when I move events, because the field atendees returned ignores the filtered resources. Same with the param e.resources in moveEnd event method.
For example, If I have 10 resources and are hidden from 1 to 5, If I move an event from resource 5 to 6 (the first and second that are showed), then returns the value 2 as the destiny resource when really would be the value 6, ignores the filtered resources.
I could attach the complete code if it is necessary.
Thank you very much
First of all, excuse my low English level.
In the scheduler I have added resources with check boxes like the basic usage demo. Also a group for these resources (each attendee is a group), and you can to hide the group when you uncheck the resource (filtering the resources).
$("#scheduler").kendoScheduler({
...
group: {
resources: ["Atendees"],
orientation: "vertical"
},
resources: [
{
field: "atendees",
name: "Atendees",
dataSource: [
{ text: "Alex", value: 1, color: "#f8a398" },
{ text: "Bob", value: 2, color: "#51a0ed" },
{ text: "Charlie", value: 3, color: "#56ca85" },
.
.
.
],
title: "Atendees"
}
]
...
});
$("#people :checkbox").change(function(e) {
var checked = $.map($("#people :checked"), function(checkbox) {
return $(checkbox).val();
});
var filter = {
logic: "or",
filters: $.map(checked, function(value) {
return {
operator: "eq",
field: "value",
value: value
};
})
};
var scheduler = $("#scheduler").data("kendoScheduler");
scheduler.resources[0].dataSource.filter(filter);
scheduler.view(scheduler.view().name);
});
For example, If I have 10 resources and are hidden from 1 to 5, If I move an event from resource 5 to 6 (the first and second that are showed), then returns the value 2 as the destiny resource when really would be the value 6, ignores the filtered resources.
I could attach the complete code if it is necessary.
Thank you very much