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

Is it possible to subscribe to services without the dataManager and use the returned JSON object to populate the scheduler?

Hello :) 

I would like to use the scheduler very like your Room Scheduler example, but populate the room names with a JSON object that was returned from a service and populate the scheduled events with a different JSON object that is also returned from another service. (I would be parsing out the data I want for the scheduler from larger JSON objects)

I don't understand why a local JSON object is fine but not a dynamic one?

Is it possible to populate the scheduler in this manner?

Thank you,
ER

P.S. I do not use VSCode so if you have the time to provide a sample, would it be possible to link to a Stackblitz example or just show the code here? Many, many thanks.

3 Replies

NR Nevitha Ravi Syncfusion Team February 18, 2019 11:52 AM UTC

Hi Elise, 
 
Thank you for contacting Syncfusion Support. 
 
We have prepared a sample for assigning resource dataSource and event dataSource from a service which can be viewed from the following link. 
 
  public selectedDate: Date = new Date(2018, 3, 4); 
    public group: GroupModel = { 
        resources: ['Projects', 'Categories'] 
    }; 
    public projectDataSource: Object[]; 
    public categoryDataSource: Object[]; 
    public allowMultiple: Boolean = true; 
    public data: Object[]; 
    public eventSettings: EventSettingsModel; 
    constructor(public  scheduledataservice:  Scheduledata) { 
    this.data  =  scheduledataservice.getEvents(); 
    this.projectDataSource  =  scheduledataservice.getProjectDataSource(); 
    this.categoryDataSource  =  scheduledataservice.getCategoryDataSource(); 
    this.eventSettings = { 
        dataSource: this.data, 
    }; 
   } 
 
Regards, 
Nevitha 



ER Elise Rothberg February 20, 2019 06:58 PM UTC

Hi Nevitha,

Thank you- I was able to get the scheduler up and running. I really appreciate the Stackblitz!

Now for fine tuning...

Thanks again,
ER


KK Karthigeyan Krishnamurthi Syncfusion Team February 21, 2019 03:48 AM UTC

 
We are happy that our solution resolved your issue. 
 
Regards, 
Karthigeyan 
 


Loader.
Live Chat Icon For mobile
Up arrow icon