New to Telerik UI for Blazor? Download Free 30-day trial

Gantt - Sorting

The second Gantt allows sorting by multiple fields. For example, try sorting on the "Start" column, then by the "Task Title" column to see the difference in behavior with single-column sorting.

Gantt with sorting enabled for a single column.

Sun 7/04 - Sat 7/10 Sun 7/11 - Sat 7/17 Sun 7/18 - Sat 7/24 Sun 7/25 - Sat 7/31 Sun 8/01 - Sat 8/07 Sun 8/08 - Sat 8/14
Sun 7/04 Mon 7/05 Tue 7/06 Wed 7/07 Thu 7/08 Fri 7/09 Sat 7/10 Sun 7/11 Mon 7/12 Tue 7/13 Wed 7/14 Thu 7/15 Fri 7/16 Sat 7/17 Sun 7/18 Mon 7/19 Tue 7/20 Wed 7/21 Thu 7/22 Fri 7/23 Sat 7/24 Sun 7/25 Mon 7/26 Tue 7/27 Wed 7/28 Thu 7/29 Fri 7/30 Sat 7/31 Sun 8/01 Mon 8/02 Tue 8/03 Wed 8/04 Thu 8/05 Fri 8/06 Sat 8/07 Sun 8/08 Mon 8/09 Tue 8/10 Wed 8/11 Thu 8/12 Fri 8/13 Sat 8/14

Gantt with sorting enabled for multiple columns.

Sun 7/04 - Sat 7/10 Sun 7/11 - Sat 7/17 Sun 7/18 - Sat 7/24 Sun 7/25 - Sat 7/31 Sun 8/01 - Sat 8/07 Sun 8/08 - Sat 8/14
Sun 7/04 Mon 7/05 Tue 7/06 Wed 7/07 Thu 7/08 Fri 7/09 Sat 7/10 Sun 7/11 Mon 7/12 Tue 7/13 Wed 7/14 Thu 7/15 Fri 7/16 Sat 7/17 Sun 7/18 Mon 7/19 Tue 7/20 Wed 7/21 Thu 7/22 Fri 7/23 Sat 7/24 Sun 7/25 Mon 7/26 Tue 7/27 Wed 7/28 Thu 7/29 Fri 7/30 Sat 7/31 Sun 8/01 Mon 8/02 Tue 8/03 Wed 8/04 Thu 8/05 Fri 8/06 Sat 8/07 Sun 8/08 Mon 8/09 Tue 8/10 Wed 8/11 Thu 8/12 Fri 8/13 Sat 8/14
  • Sorting.razor
  • GanttTaskDto.cs
  • GanttTaskService.cs
  • GanttDependencyDto.cs
  • GanttDependencyService.cs
Loading the demo source code...please wait.

Description

The Telerik Gantt for Blazor allows you to sort its data by one or multiple fields in ascending and descending order. When you set the Sortable parameter of the component to true you will be able to click on the header of a column to apply sorting. In the second Gantt on this demo, you can see that sorting is enabled for multiple columns. To achieve the same behavior in your own application set the SortMode to Multiple.

This Blazor Gantt - Sorting demo is part of a unique collection of hundreds of Blazor demos, with which you can see all Telerik Blazor components and their features in action. View the source code of each of the demos or directly adapt and edit them, including their theme appearance, in some of our dedicated playgrounds for Blazor projects - Telerik REPL for Blazor.

Support & Learning Resources

An error has occurred. This application may no longer respond until reloaded.
Reload