We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Schedule - multiple resources

Hi Team,
I have using angular schedule- multiple resources group. we have added checkbox for group... when we uncheck the checkbox datasource should be refresh automatically.. Means when we uncheck the particular check box that particular datasource should be removed from group.. Kindly give the solution for this issue..

FYI:  When datasource load the first time, filtering is working using scheduler component. But after I change the checkbox datasource depends on other component, it didn't work.

Scheduler
Multiple Resources
Shared Events



1 Reply

RV Ravikumar Venkatesan Syncfusion Team November 11, 2022 04:35 AM

We suspect that you are facing a problem while filtering resources using CheckBox. Use the highlighted line on the onChange method bound to the CheckBox change event to resolve this. You can find the demo and sample below for reference.


Demo: https://ej2.syncfusion.com/angular/demos/#/material/schedule/add-remove-resources

Sample: https://stackblitz.com/edit/ej2-angular-schedule-add-remove-resources-sample?file=app.component.ts


[app.component.ts]

  onChange(argsChangeEventArgs): void {

    const valuenumber = parseInt((args.event.currentTarget as Element).querySelector('input').getAttribute('value'), 10);

    let resourceDataObject[] = this.calendarCollections.filter((calendar: { [keystring]: Object }) => calendar.CalendarId === value);

    if (args.checked) {

      this.scheduleObj.addResource(resourceData[0], 'Calendars'value - 1);

    } else {

      this.scheduleObj.removeResource(value'Calendars');

    }

  }


Loader.
Live Chat Icon For mobile
Up arrow icon