Sorting

19 Sep 20171 minute to read

The Gantt control for JavaScript has built-in support for sorting one or more columns.

Sorting Columns

Gantt allows the tasks to be sorted in ascending or descending order based on the selected column by enabling the allowSorting option in Gantt control. The following code example shows you how to enable sorting in Gantt control.

  • JAVASCRIPT
  • <ej-gantt id="GanttControl" [allowSorting]="true"
        //...>
    </ej-gantt>

    Multicolumn sorting

    Gantt allows you to sort multiple columns by clicking the desired column headers while holding the CTRL key. The following code example shows you how to enable multicolumn sorting in Gantt control.

  • JAVASCRIPT
  • <ej-gantt id="GanttControl" [allowSorting]="true" [allowMultiSorting]="true"
        //...>
    </ej-gantt>

    The following screenshot shows the output of multicolumn sorting in Gantt control.