Hi,
I’m having some problem trying to add sections and events on the fly in the timeline view (not in tree mode).
I was first using addSection() and addEvent() but i read in the doc that this is reserved for timeline in treeview mode so i 'm trying to use the updateCollection. and this is working fine with the sections.
scheduler.createTimelineView({
...
y_unit: scheduler.serverList("elemJour", listeUsers),
...
});
then in a function i’m calling
scheduler.updateCollection("elemJour", updatedListeUsers);
And the section is added
My events are loading as followed in the init() function
scheduler.parse(JSON.stringify(scheduler.serverList("events", listeEvents)), "json");
then right after inserting my section i’m trying to add the related events
I get them from an ajax call then i add the returned events to my global list and then i update the collection but nothing happend my section (just added above) remain still empty.
$.getJSON(urlGetUserEvent , function (datauserevent) {
// add new events to the main list
listeEvents = listeEvents.concat(datauserevent);
// update events collection
scheduler.updateCollection("events", listeEvents);
// close modale
$('#addUserForm').modal('hide');
});
I’m sure i’m missing something