Multiple event sources / datamangers for Schedule

I have a Schedule connected to my API using a DataManager with CRUD option which works well.

  const [dataManager, setDataManager] = useState<DataManager | undefined>(undefined);
  useEffect(() => {
    const fetchData = async () => {
      const manager = new DataManager({
        url: config.apiEndpoint + '/api/appointments',
        crudUrl: config.apiEndpoint + '/api/appointments',
        adaptor: new UrlAdaptor(),
        headers: [{ Authorization`Bearer ${token}` }]
      });
      await manager.ready;
      setDataManager(manager);
    };
    fetchData();
  }, [token]);

  const eventSettings: EventSettingsModel = {
    dataSource: dataManager,
    allowAdding: true,
    allowEditing: true,
    allowDeleting: true,
  }

<ScheduleComponenteventSettings={eventSettings}>
....
    

Now I would like to add a second remote source for events that only get shown read-only. Is this scenario supported?


3 Replies 1 reply marked as answer

VR Vijay Ravi Syncfusion Team September 27, 2024 09:42 AM UTC

Hi Thomas ,
 

Currently, the Schedule control does not support the use of multiple remote data managers. If you need to retrieve data from different data sources, you can collect all appointment data from these various sources in server side. Subsequently, you can utilize the getUrl method to collect all appointment data into the schedule effectively.


Don't hesitate to get in touch if you require further help or more information.


Regards,

Vijay


Marked as answer

TP Thomas Pentenrieder September 30, 2024 12:23 PM UTC

Thanks, I did solve it server-side.



RV Ravikumar Venkatesan Syncfusion Team October 2, 2024 06:07 AM UTC

Thomas,

You are welcome. Feel free to let us know if you need any more help.

Regards,
Ravikumar Venkatesan


Loader.
Up arrow icon