Hi Amrutha,
Thanks for the update.
If we render all resource on unchecking all the check box means next time clicking the check box will not show difference as we have rendered all resources before it. We have prepared the below sample to render empty Scheduler while unchecking all the check box.
onChange(args: ChangeEventArgs): void {
let value: number = parseInt((<Element>args.event.target).getAttribute('value'), 10);
let resourceData: Object[] =
this.calendarCollections.filter((calendar: { [key: string]: Object }) => calendar.AirlineId === value);
if (args.checked) {
if (this.scheduleObj.group.resources.length === 0) {
this.scheduleObj.group.resources = ['Airlines'];
debugger
this.scheduleObj.addResource(resourceData[0], 'Airlines', 0);
} else
this.scheduleObj.addResource(resourceData[0], 'Airlines', value - 1);
} else {
var resourceColl = this.scheduleObj.resourceCollection[0].dataSource as { [key: string]: Object }[];
if (resourceColl.length === 1) {
this.scheduleObj.group.resources = [];
this.scheduleObj.resourceCollection[0].dataSource = [];
}
else
this.scheduleObj.removeResource(value, 'Airlines');
}
}
Regards,
Karthi