menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GanttSegmentFields<TValue, TSegments> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GanttSegmentFields<TValue, TSegments>

    Represents a class for Gantt segment fields.

    Inheritance
    System.Object
    GanttSegmentFields<TValue, TSegments>
    Namespace: Syncfusion.Blazor.Gantt
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class GanttSegmentFields<TValue, TSegments> : OwningComponentBase
    Type Parameters
    Name Description
    TValue

    The type of Tasks in the Gantt chart.

    TSegments

    The type of segments in the Gantt chart.

    Constructors

    GanttSegmentFields()

    Declaration
    public GanttSegmentFields()

    Properties

    DataManager

    Gets or sets an instance of the DataManager class, which provides functionality for performing data operations in applications. DataManager serves as an abstraction layer for working with remote data sources.

    Declaration
    public DataManager DataManager { get; set; }
    Property Value
    Type Description
    DataManager

    An instance of DataManager

    Remarks

    Through DataManager we can bind remote data for segments.

    DataSource

    Gets or sets the data collection for the Gantt chart segments.

    Declaration
    public IEnumerable<TSegments> DataSource { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<TSegments>

    The collection of segments of type System.Collections.IEnumerable used for rendering multiple segments for a task.

    Remarks

    This collection is used to map segments into the tasks collection.

    Duration

    Gets or sets the name of the duration property for segments.

    Declaration
    public string Duration { get; set; }
    Property Value
    Type Description
    System.String

    The value of this property can be set to a string value indicating the duration’s field name in data object of the segment datasource collection.

    Remarks

    This property is used to map the duration of the segment from the segment collection.

    EndDate

    Gets or sets the name of the end date property for segments.

    Declaration
    public string EndDate { get; set; }
    Property Value
    Type Description
    System.String

    The value of this property can be set to a string value indicating the end date of the segment.

    Remarks

    This property is used to map the end date of the segment from the segment collection.

    ForeignKey

    Gets or sets the name of the foreign key property for segments.

    Declaration
    public string ForeignKey { get; set; }
    Property Value
    Type Description
    System.String

    The name of the foreign key property that specifies the primary id of the task collection in the GanttSegmentFields<TValue, TSegments> of the Gantt chart, referencing Id

    Remarks

    This property allows the user to establish a relationship between the task collection and the segment collection by specifying the foreign key property.

    PrimaryKey

    Gets or sets the name of the primary key property for the segments collection in the Gantt chart.

    Declaration
    public string PrimaryKey { get; set; }
    Property Value
    Type Description
    System.String

    The name of the primary key property for the segments collection in the Gantt chart.

    Remarks

    This property allows the user to specify the identifier of a segment from the segment collection. The default value is null, and it should be a non-null value to identify the segment.

    SegmentChanging

    Gets or sets an event callback that is raised when the segment in a task is modified.

    Declaration
    public EventCallback<SegmentEventArgs<TSegments>> SegmentChanging { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<SegmentEventArgs<TSegments>>

    An event callback function.

    Remarks

    The event handler receives a SegmentEventArgs<TSegments> object, which provides details about the taskbar and connector details.

    StartDate

    Gets or sets the name of the start date property for segments.

    Declaration
    public string StartDate { get; set; }
    Property Value
    Type Description
    System.String

    The value of this property can be set to a string value indicating the start date of the segment.

    Remarks

    This property is used to map the start date of the segment from the segment collection. It's a mandatory field for GanttSegmentFields<TValue, TSegments>.

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder

    Dispose(Boolean)

    Disposes the resources used by the Blazor component. Called by the framework when the component is removed from the render tree.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    true if managed resources should be disposed; otherwise, false.

    OnAfterRenderAsync(Boolean)

    Called after the component has rendered. Executes logic that depends on the rendered content. This method is called after each render, and the firstRender flag indicates if it is the first render.

    Declaration
    protected override Task OnAfterRenderAsync(bool firstRender)
    Parameters
    Type Name Description
    System.Boolean firstRender

    Set to true if this is the first time the component has been rendered.

    Returns
    Type
    System.Threading.Tasks.Task

    OnInitializedAsync()

    Triggers during the initial rendering of the component.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    A System.Threading.Tasks.Task representing the asynchronous operation.

    OnParametersSetAsync()

    Called by the framework when component parameters have been set. Executes logic that depends on the updated parameter values.

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type
    System.Threading.Tasks.Task
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved