Sorting

1 Mar 20171 minute to read

The Gantt control 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 allow-sorting option in Gantt control. The following code example shows you how to enable sorting in Gantt control.

  • CSHTML
  • <ej-gantt id="ganttSample" datasource="ViewBag.datasource"
        //...
        allow-sorting="true">
    </ejGantt>

    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.

  • CSHTML
  • <ej-gantt id="ganttSample" datasource="ViewBag.datasource"
        //...
        allow-sorting="true"
        allow-multi-sorting="true">
    </ejGantt>

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