aspnetmvc-401321-components-gantt.md
The Gantt (GanttExtension) visualizes the task flow.
Run Demo: Gantt Extension Demos
Data-Bound Mode (More details | See demo)
Edit Tasks (More details | See demo)
Export To PDF (More details)
Column Types (More details | See demo)
Scale Tasks (More details | See demo)
Custom Work Time (More details | See demo)
Custom Tooltip Content More details | See demo
Task Template (More details) | See demo
Custom Context Menu (More details | See demo)
Validation (More details | See demo)
Strip Lines (More details | See demo)
Toolbar (More details | See demo)
Use the Gantt(GanttSettings) helper method to add the Gantt (GanttExtension) extension to a view. The Gantt(GanttSettings) method’s parameter provides access to the Gantt’s settings (GanttSettings).
View code (Razor):
@Html.DevExpress().Gantt(settings => {
settings.Name = "gantt";
settings.SettingsGanttView.ViewType = GanttViewType.Weeks;
settings.Mappings.Task.Key = "ID";
settings.Mappings.Task.ParentKey = "ParentID";
//...
settings.SettingsTaskList.Columns.Add(
new GanttTextColumn() {
FieldName = "Subject",
Caption = "Title",
Width = Unit.Pixel(360)
}
);
//...
}).Bind(GanttDataProvider.Tasks, GanttDataProvider.Dependencies, GanttDataProvider.Resources, GanttDataProvider.ResourceAssignments).GetHtml()
Note
The Partial View should contain only the extension’s code.