Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GanttControl.SetTimelineBarRange(TimelineBar, Nullable<DateTime>, Nullable<DateTime>) Method

Sets a custom date range for the specified timeline bar.

Namespace: DevExpress.XtraGantt

Assembly: DevExpress.XtraGantt.v24.2.dll

NuGet Package: DevExpress.Win.Gantt

#Declaration

public void SetTimelineBarRange(
    TimelineBar bar,
    DateTime? start,
    DateTime? finish
)

#Parameters

Name Type Description
bar TimelineBar

The timeline bar.

start Nullable<DateTime>

The start date.

finish Nullable<DateTime>

The finish date.

#Remarks

The date range of timeline bars matches the duration of the project. The SetTimelineBarRange method allows you to specify a custom date range for a specific timeline bar (within the date range of the timeline).

You can also use a timeline bar’s Options to specify the date range.

Users can use a context menu to specify a custom date range for the focused timeline bar.

Read the following topic for detailed information and examples: Timeline.

See Also