Ability to do something once all the events are drawn

is there a way to add an event that I can listen to or to call a function that would fire only when all the events in the scheduler are finished drawing. I’d like to be able to show a loading message while items are being added and only make it disappear when all the items have been attached to the DOM.

Hi,

There is onDataRender event that fires after data has been rendered on the page.
https://docs.dhtmlx.com/scheduler/api__scheduler_ondatarender_event.html

Hi Polina,
its possible that I’m running an old version of the dhtmlx scheduler because I don’t see this event firing. Was this event put in after version 4.4?

Hi,

I checked it and found out that the event was added in Dec 8, 2016 :slight_smile:
Ver 4.4 was released in February 2, 2017 according to the article in the blog

You can open this sample from your Scheduler package locally
https://docs.dhtmlx.com/scheduler/samples/01_initialization_loading/01_basic_init.html
update the code in the next way:

scheduler.config.xml_date="%Y-%m-%d %H:%i";

scheduler.attachEvent("onDataRender", function(){
	    dhtmlx.message("Data was rendered on the page")
});

scheduler.init('scheduler_here',new Date(2018,0,1),"week");
scheduler.load("../common/events.json", "json");

Now you can see when onDataRender fires.