I need to recreate time line view with respect to a drop down change.
timeline view sections will change ( from server ). So then events will refresh again after that.
is there is any method for that?
I need to recreate time line view with respect to a drop down change.
timeline view sections will change ( from server ). So then events will refresh again after that.
is there is any method for that?
Hi,
timeline uses scheduler.serverList api to store sections on the client. You can update sections dynamically with scheduler.updateCollection method:
scheduler.updateCollection(collectionName, newCollection);
where newCollection is array of {key, label} objects. ‘collectionName’ for specific view is stored in scheduler configuration as scheduler.config.serverLists[“view_name”]
So timeline can be updated with code like following:
var listName = scheduler.config.serverLists["timeline"];
var items = [{key:1, label:"Section 1"}, {key:2, label:"Section 2"}, ...];
scheduler.updateCollection(listName, items);
thank you Aliaksandr
It is working.