Skip to main content

GanttSettings.SettingsTaskList Property

Provides access to the task list settings.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v24.1.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public GanttTaskListSettings SettingsTaskList { get; }

Property Value

Type Description
GanttTaskListSettings

Contains task list settings.

Remarks

Use the SettingsTaskList property to customize the control’s task list settings.

Gantt Chart - Columns

The Gantt extension stores its columns in the Columns collection. This collection’s methods allow you to add and remove columns.

Run Demo: MVCxGantt - Columns

Available column types:

Column Type

Description

GanttCommandColumn

A command column.

GanttCheckColumn

A column that displays Boolean values.

GanttColorEditColumn

A column that displays color values.

GanttDateTimeColumn

A data column that displays DateTime values.

GanttProgressBarColumn

A column that displays a progress bar.

GanttSpinEditColumn

A data column that displays numeric values.

GanttTextColumn

A data column that displays text values.

GanttTimeEditColumn

A data column that displays time portions of DateTime values.

Create a Column

Use the Add method to add a column to the Columns collection. Specify the column’s FieldName property.

settings.SettingsTaskList.Columns.Add(new GanttTextColumn() { FieldName = "Subject", Caption = "Title", Width = Unit.Pixel(360) });
settings.SettingsTaskList.Columns.Add(new GanttDateTimeColumn() { FieldName = "StartDate", Caption = "Start", Width = Unit.Pixel(100), DisplayFormat = "MM/dd/yyyy" });

Access a Column

Use the Item[Int32] property to access individual columns by their index in the column collection.

GanttTextColumn colFirstColumn = (GanttTextColumn)settings.SettingsTaskList.Columns[0];

Specify a Column Width

Use the ColumnMinWidth property to specify the minimum width for all columns in the Gantt.

settings.SettingsTaskList.ColumnMinWidth = Unit.Pixel(45);

To specify the minimum width for an individual column, use the MinWidth property.

settings.SettingsTaskList.Columns.Add(new GanttTextColumn() { FieldName = "Subject", Caption = "Title", MinWidth = Unit.Pixel(50) });

Column Editor

Each data column type has an editor in edit mode. For example, the GanttCheckColumn column allows you to edit Boolean values in a checkbox editor.

Use the column’s Properties[Editor_Name] property to access column editor settings.

Gantt Columns - Editors

settings.Columns.Add(c => {
    c.FieldName = "Passengers";
    c.EditorProperties().SpinEdit(p => {
        p.MinValue = 0;
        p.MaxValue = 400;
    });
});
See Also