In my init function I'm creating the scheduler before I fire off an async method to fetch data. At this point the resources are in place, and the async function retrieves the event.
But I'm having some problem adding it, do I need to refresh the scheduler after I added a event? I tried that too
scheduler.events.appendChild({
resourceId: ...,
resourceType: 1,
startDate: new Date(...),
endDate: new Date(...),
draggable: false,
resizable: true,
eventColor: '#CC85FF',
});
Seems your trial license expired long ago. To continue using our product (and to get our support) please arrange proper licensing, contact sales@bryntum.com.
Seems your trial license expired long ago. To continue using our product (and to get our support) please arrange proper licensing, contact sales@bryntum.com.
The sales team can check their mail.
pmiklashevich wrote: ↑Mon Jun 24, 2019 2:59 pm
Please see data property on the store.
scheduler.eventStore.data = []
P.S. No need to refresh. Should be done automatically based on changes in the store.
scheduler.events is a predefined dataset to be used with the eventStore which will get created automatically, if no event store is specified.
eventStore.data is a raw data to load initially if specified as a config. Also if you set something to eventStore.data = [...arrayOfNewData] as to a property, it will replace the whole dataset with the new one. That is the proper way to load data initially after an Ajax request.
To add/remove tasks please use proper API methods. For example for adding new tasks please call eventStore.add(...) method. If you're are working with tree store, please see treeNode mixin and store.rootNode.appendChild(...) method.