onTaskClick

fires when the user clicks on a task row in the grid area (including the 'expand/collapse' and 'add task' buttons) or on a task bar in the timeline area

boolean onTaskClick(string id, [Event e] ){ ... };

Parameters

idstringthe id of the clicked task
eEventa native event object

Returns

booleandefines whether the default action of the event will be triggered (true) or canceled (false)

Example

gantt.attachEvent("onTaskClick", function(id,e){
    //any custom logic here
    return true;
});

Details

The event is blockable. Returning false will cancel the default handler (selecting a task)

See also
Back to top