A newer version of this page is available. Switch to the current version.

GanttExtension Class

The Gantt extension.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v19.2.dll


public class GanttExtension :


The Gantt allows you to display the task flow and dependencies between tasks.


To declare the Gantt in a View, invoke the Gantt(GanttSettings) or Gantt(Action<GanttSettings>) helper methods. These methods return the Gantt extension that is implemented by the GanttExtension class.

To configure the Gantt extension, pass the GanttSettings object to the Gantt(GanttSettings) helper method as a parameter. The GanttSettings object contains all the Gantt extension settings.

@Html.DevExpress().Gantt(settings => {
    settings.Name = "gantt";
    settings.CallbackRouteValues = new { Controller = "Gantt", Action = "FeaturesPartial" };
    settings.Width = Unit.Percentage(100);

    settings.KeyFieldName = "ID";
    settings.ParentFieldName = "ParentID";


}).Bind(GanttDataProvider.Tasks, GanttDataProvider.Dependencies, GanttDataProvider.Resources, GanttDataProvider.ResourceAssignments).GetHtml()


View Types

The Gantt can use the following views to display tasks: hours, days, weeks, months.

Custom Work Time

You can specify the work and non-work time intervals, as well as custom workdays and holidays.

The work time settings are stored in the WorkTimeRules collection. The following rules are available:

Each rule can contain work time ranges and recurrence settings.

Scrollable area

You can scroll the TreeList and Gantt areas to view all the tasks.

Task title position

You can hide a task title or display it inside or near the task.

Online Demos


See Also