how to load datasource in scheduler after some time(like 3-4 secs)

i am working on a project where i am using an syncfusion scheduler..
when i refresh the page the datasource is loaded after some time like (3-4 secs)
but i am not able to do so because it initialises before the datasource arrives..
So i want that when my datasource is loaded like some array , then only scheduler displays the data


one more query..if i want to make this app in production..then do i need to purchase the syncfusion scheduler..?

1 Reply 1 reply marked as answer

BS Balasubramanian Sattanathan Syncfusion Team July 16, 2020 03:05 PM UTC

Hi Shubham sharma, 
 
Greetings from Syncfusion Support. 
 
We have validated your requirement “how to load datasource in scheduler after some time(like 3-4 secs)” at our side. We suspect that your need is to load the scheduler datasource in after some time. We have prepared a sample based on that using the below code snippet. 
 
setTimeout(function () { 
  let scheduleObj = (document.querySelector('.e-schedule') as any).ej2_instances[0]; 
  let scheduleData: Object[] = [ 
    { 
      Id: 1, 
      Subject: 'Conference', 
      StartTime: new Date(2018, 1, 12, 9, 0), 
      EndTime: new Date(2018, 1, 12, 10, 0), 
      IsAllDay: false 
    }, { 
      Id: 2, 
      Subject: 'Meeting', 
      StartTime: new Date(2018, 1, 15, 10, 0), 
      EndTime: new Date(2018, 1, 15, 11, 30), 
      IsAllDay: false 
    }, { 
      Id: 3, 
      Subject: 'Testing', 
      StartTime: new Date(2018, 1, 11, 9, 0), 
      EndTime: new Date(2018, 1, 11, 10, 0), 
      IsAllDay: false 
    }, { 
      Id: 4, 
      Subject: 'Vacation', 
      StartTime: new Date(2018, 1, 13, 9, 0), 
      EndTime: new Date(2018, 1, 13, 10, 0), 
      IsAllDay: false 
    } 
  ]; 
  scheduleObj.eventSettings.dataSource = scheduleData; 
}, 3000); 
 
 

Kindly try the above sample and let us know the below details if the solution is not helpful. 
  • Replicate your problem in the above sample or
  • Share a sample illustrating the problem which would help us to proceed further.

Regards, 
Balasubramanian S 


Marked as answer
Loader.
Up arrow icon