Skip to main content
All docs
V25.1
  • GanttControl.AddTaskToTimeline(GanttControlNode, TimelineBar) Method

    Displays the specified task on the timeline.

    Namespace: DevExpress.XtraGantt

    Assembly: DevExpress.XtraGantt.v25.1.dll

    NuGet Package: DevExpress.Win.Gantt

    Declaration

    public void AddTaskToTimeline(
        GanttControlNode node,
        TimelineBar bar = null
    )

    Parameters

    Name Type Description
    node GanttControlNode

    The task.

    Optional Parameters

    Name Type Default Description
    bar TimelineBar null

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

    Remarks

    // 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]);
    

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

    See Also