JavaScript/jQuery Gantt - sorting
Users can sort Gantt data by a single or multiple columns. Use the mode option to specify the sort mode.
Single Mode. Click a column header to sort data by this column. Subsequent clicks on the same header reverse the sort order.
Multiple Mode. Hold Shift and click column headers to sort data by multiple columns. Subsequent clicks on the same header with the Shift key pressed reverse the column's sort order. Set the showSortIndexes option to true to show the column sort index in the header.
To disable sorting for a particular column, set the column’s allowSorting option to false.
To clear sorting for a column, hold Ctrl and click the column header. You can also use the column header’s context menu to specify the column’s sort settings and clear sorting. Use the ascendingText, descendingText, and the clearText options to specify text for the corresponding context menu items.
- $(function() {
- $("#gantt").dxGantt({
- sorting: {
- mode: 'multiple',
- showSortIndexes: true,
- ascendingText: "Ascending Order",
- descendingText: "Descending Order",
- clearText: "Clear Sort"
- }
- });
- });
showSortIndexes
Specifies whether to display sort indexes in column headers. Applies only when sorting.mode is "multiple" and data is sorted by two or more columns.
If you have technical questions, please create a support ticket in the DevExpress Support Center.