Some events are not attached.

Greetings,
I’ve set up my gannt so I’m attaching events first and then loading dummy data.

    projectGantt.dhx_gantt().attachEvent("onDataRender", () -> 
      console.log "onDataRender"
    )

    projectGantt.dhx_gantt().attachEvent("onGanttReady", () -> 
      console.log "onGanttReady"
    )

    projectGantt.dhx_gantt().attachEvent("onGanttRender", () -> 
      console.log "onGanttRender"
    )

    projectGantt.dhx_gantt().attachEvent("onLoadStart", () -> 
      console.log "onLoadStart"
    )

    projectGantt.dhx_gantt().attachEvent("onLoadEnd", () -> 
      console.log "onLoadEnd"
    )

    //CoffeeScript
    projectGantt.dhx_gantt 
       data: demo_tasks

After page load, it only hits ‘onGanttRender’ and ‘onDataRender’.

Cheers,

Hi,
onLoadStart and onLoadEnd fires only in case ajax loading, i.e. only if gantt.load is called
docs.dhtmlx.com/gantt/api__gantt_load.html

Thanks for reply. What options do I have in this case?

What is currently happening is, I want to set the height of the outer parent container that renders the gantt view and I want the height for the .gantt_grid_data and .gantt_grid_scale based on the newly set height of my container.

I wanted to do something like, before rendering the gantt view, update the height else I have an extra scrollbar.

I figured this out, was a timing issue. Added a setTimeout of 100ms.

Hi,
if you use version 3.0, it contains an event that fires each time the data was redrawn
docs.dhtmlx.com/gantt/api__gantt … event.html

gantt.attachEvent("onDataRender", function(){ //... do the sizing });