Skip to main content
A newer version of this page is available. .

GanttViewSettings.ViewType Property

Specifies a view to display tasks.

Namespace: DevExpress.Web.ASPxGantt

Assembly: DevExpress.Web.ASPxGantt.v20.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(GanttViewType.Days)]
public GanttViewType ViewType { get; set; }

Property Value

Type Default Description
GanttViewType Days

One of the enumeration values.

Available values:

Name Description
TenMinutes

Displays ten minutes.

Hours

Displays hours.

SixHours

Displays six hours.

Days

Displays days.

Weeks

Displays weeks.

Months

Displays months.

Quarter

Displays quarters.

Years

Displays years.

Property Paths

You can access this nested property as listed below:

Object Type Path to ViewType
ASPxGantt
.SettingsGanttView .ViewType
GanttSettings
.SettingsGanttView .ViewType
MVCxGantt
.SettingsGanttView .ViewType

Remarks

Use the ViewType property to specify a view to display tasks: hours, days, weeks, months.

Example

<dx:ASPxGantt ID="Gantt" runat="server" ...>
    <Columns>
        <dx:GanttTextColumn FieldName="Subject" />
        <dx:GanttDateTimeColumn FieldName="StartDate" DisplayFormat="MM\/dd\/yyyy" />
        <dx:GanttDateTimeColumn FieldName="EndDate" DisplayFormat="MM\/dd\/yyyy" />
    </Columns>
    <SettingsGanttView ViewType="Weeks" />
</dx:ASPxGantt>

Concept

Gantt Control

Online Demos

See Also