Back to Devexpress

GanttControl.AddTaskToTimeline(GanttControlNode, TimelineBar) Method

windowsforms-devexpress-dot-xtragantt-dot-ganttcontrol-dot-addtasktotimeline-x28-devexpress-dot-xtragantt-dot-ganttcontrolnode-devexpress-dot-xtragantt-dot-timeline-dot-timelinebar-x29.md

latest2.7 KB
Original Source

GanttControl.AddTaskToTimeline(GanttControlNode, TimelineBar) Method

Displays the specified task on the timeline.

Namespace : DevExpress.XtraGantt

Assembly : DevExpress.XtraGantt.v25.2.dll

NuGet Package : DevExpress.Win.Gantt

Declaration

csharp
public void AddTaskToTimeline(
    GanttControlNode node,
    TimelineBar bar = null
)
vb
Public Sub AddTaskToTimeline(
    node As GanttControlNode,
    bar As TimelineBar = Nothing
)

Parameters

NameTypeDescription
nodeGanttControlNode

The task.

|

Optional Parameters

NameTypeDefaultDescription
barTimelineBarnull

The timeline bar to display the added task. null to display the task on the focused timeline bar.

|

Remarks

csharp
// Displays the focused task on the focused timeline bar.
ganttControl1.AddTaskToTimeline(ganttControl1.FocusedNode as GanttControlNode);
// Displays the focused task on the first timeline bar.
ganttControl1.AddTaskToTimeline(ganttControl1.FocusedNode as GanttControlNode, ganttControl1.TimelineBars[0]);
vb
' Displays the focused task on the focused timeline bar.
ganttControl1.AddTaskToTimeline(TryCast(ganttControl1.FocusedNode, GanttControlNode))
' Displays the focused task on the first timeline bar.
ganttControl1.AddTaskToTimeline(TryCast(ganttControl1.FocusedNode, GanttControlNode), ganttControl1.TimelineBars(0))

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

See Also

RemoveTaskFromTimeline

FocusedTimelineBar

GanttControl Class

GanttControl Members

DevExpress.XtraGantt Namespace