Skip to main content

onAfterSort

Description

Fires after tasks are sorted in the grid

onAfterSort: (field: string | GanttCallback, desc?: boolean, parent?: string | number) => void;

Parameters

  • field - (required) string | function - the name of the column that the grid was sorted by or a custom sorting function
  • desc - (optional) boolean - optional, the sorting direction: true - descending, false - ascending
  • parent - (optional) string | number - optional, the id of the parent task, if the tasks were sorted only in the branch of the specified parent

Example

gantt.attachEvent("onAfterSort",function(field, direction, parent){
// your code here
});