I want to dynamically filter resources in Scheduler
and show resource and events based on the filter. Please see below demo project which I created.
As per my requirement I want to show only attendees: 1 and his event in Scheduler
when I clicked on filter button.
It looks like you are not applying the filtering on the datasource correctly.
Try this line
schedulerTimeLine.dataSource.filter(filter);
instead of this one:
schedulerTimeLine.resources[0].dataSource.filter(filter);
Update:
After clearing up your requirements i think what you need is already present in your demo. You only need to put up proper attendee value in the filter to achieve the desired effect, i.e:
var filter = {
logic: "or",
filters:[
{field:"value", operator:"eq",value:1}
]
};
This filter will display only attendee with id 1name Alex.