New to Telerik UI for BlazorStart a free 30-day trial

A component that lets you visualize and manage project tasks with a TreeList and a timeline. Supports multiple views (Day/Week/Month/Year), task dependencies, inline/popup/in-cell editing, sorting, filtering (row/menu), column resize/reorder, tooltips, keyboard navigation, and a customizable toolbar. Provides state get/set APIs and events for add/edit/create/update/delete, expand/collapse, view changes, and overall state changes. Children: GanttViews, GanttColumns, GanttSettings, GanttDependenciesSettings.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Type Parameters:

TItem

Syntax:

C#
public class TelerikGantt<TItem> : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikGantt<TItem>

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members BaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeVoidAsyncWithoutAwait(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnParametersSetAsync()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)ComponentBase.SetParametersAsync(ParameterView)...

Constructors

C#
public TelerikGantt()

Methods

C#
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters:__builderRenderTreeBuilder

Overrides: ComponentBase.BuildRenderTree(RenderTreeBuilder)

C#
public override void Dispose()

Overrides: BaseComponent.Dispose()

Gets the current state of the Gantt. Includes sorting, filtering, edit items, column state, etc.

C#
public GanttState<TItem> GetState()
Returns:

GanttState<TItem>

Instance of a GanttState<TItem> class that contains all data.

C#
protected virtual Dictionary<string, object> GetWidgetOptions()
Returns:

Dictionary<string, object>

C#
protected Task NavigateToTreeList(TaskElement item)
Parameters:itemTaskElementReturns:

Task

C#
protected void NavigateToView(GanttView view)
Parameters:viewGanttView
C#
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters:firstRenderboolReturns:

Task

Overrides: BaseComponent.OnAfterRenderAsync(bool)

Processes the available data with applied all data operations. Useful in scenarios where the data might change from an outside source.

C#
public void Rebind()
C#
protected void RefreshTimeLine()
C#
protected void RefreshTreeList()

Sets the state of the Gantt. Includes sorting, filtering, edit items, column state, etc.

C#
public Task SetStateAsync(GanttState<TItem> state)
Parameters:stateGanttState<TItem>Returns:

Task

Properties

C#
public bool AutoGenerateColumns { get; }

Defines whether the columns of the TreeList can be reordered.

C#
[Parameter]
public bool ColumnReorderable { get; set; }

Defines whether the columns of the TreeList can be resized.

C#
[Parameter]
public bool ColumnResizable { get; set; }
C#
protected TreeListEditMode ConvertedTreeListEditMode { get; }

Defines the data source of the Gantt.

C#
[Parameter]
public IEnumerable<TItem> Data { get; set; }
C#
public GanttDependencies DependenciesSettings { get; set; }

DependencyElements

List<DependencyElement>

C#
public List<DependencyElement> DependencyElements { get; set; }

Defines if a loading indicator displays in the TreeList during long-running operations. The default value is true. The setting has no effect on initial data load.

C#
[Parameter]
public bool EnableLoaderContainer { get; set; }

Enables WebMCP tool registration for this Gantt. When true, Gantt operations are exposed as tools discoverable by AI models through the browser. Configure tool names and overrides via GanttWebMcpSettings inside GanttSettings.

C#
[Parameter]
public bool EnableWebMcpTools { get; set; }

Defines the EndField of the Data. Default value: "End".

C#
[Parameter]
public string EndField { get; set; }

FilterMenuType

FilterMenuType

Defines the filter menu type when "FilterMode" is set to "FilterMenu".

C#
[Parameter]
public FilterMenuType FilterMenuType { get; set; }

Defines the Filter Mode of the Component.

C#
[Parameter]
public GanttFilterMode FilterMode { get; set; }

Time in ms between the last typed symbol and the firing of the internal filter oninput event. Default is 150ms.

C#
[Parameter]
public int FilterRowDebounceDelay { get; set; }

Defines the container for the TreeList columns. Children: GanttColumn tags.

C#
[Parameter]
public RenderFragment GanttColumns { get; set; }

Defines the container for the Gantt Settings such as GanttPopupEditSettings. Children: GanttPopupEditSettings tag.

C#
[Parameter]
public RenderFragment GanttSettings { get; set; }

Defines the custom toolbar template for the Gantt. Children: allows arbitrary content.

C#
[Parameter]
public RenderFragment GanttToolBarTemplate { get; set; }

Defines the container for the Gantt views. Children: GanttDayView, GanttWeekView, GanttMonthView, GanttYearView.

C#
[Parameter]
public RenderFragment GanttViews { get; set; }

Defines the HasChildren DataField of the DataSource.

C#
[Parameter]
public string HasChildrenField { get; set; }

Defines the height of the Gantt.

C#
[Parameter]
public string Height { get; set; }

Defines the Id DataField of the DataSource.

C#
[Parameter]
public string IdField { get; set; }

Defines the Items DataField of the DataSource that contains the child nodes.

C#
[Parameter]
public string ItemsField { get; set; }

Defines whether the Component is navigable using the keyboard.

C#
[Parameter]
public bool Navigable { get; set; }

The position at which a new data item is inserted in the Gantt's tree list - top or bottom. Default value is Top.

C#
[Parameter]
public GanttTreeListNewRowPosition NewRowPosition { get; set; }

Fires when an item is about to be inserted.

C#
[Parameter]
public EventCallback<GanttAddEventArgs> OnAdd { get; set; }

Fires when a row is collapsed.

C#
[Parameter]
public EventCallback<GanttCollapseEventArgs> OnCollapse { get; set; }

Fires when an item is created.

C#
[Parameter]
public EventCallback<GanttCreateEventArgs> OnCreate { get; set; }

Fires when a task is deleted.

C#
[Parameter]
public EventCallback<GanttDeleteEventArgs> OnDelete { get; set; }

Fires when an item is about to be edited.

C#
[Parameter]
public EventCallback<GanttEditEventArgs> OnEdit { get; set; }

Fires when a row is expanded.

C#
[Parameter]
public EventCallback<GanttExpandEventArgs> OnExpand { get; set; }

Fires on user interaction that causes changes in the GanttState<TItem>.

C#
[Parameter]
public EventCallback<GanttStateEventArgs<TItem>> OnStateChanged { get; set; }

Invoked when the Gantt is initializing for the first time and before its initial render. Hook to this event if you would like to provide an initial state through the State field of its event arguments.

C#
[Parameter]
public EventCallback<GanttStateEventArgs<TItem>> OnStateInit { get; set; }

Fires when the Update command is executed.

C#
[Parameter]
public EventCallback<GanttUpdateEventArgs> OnUpdate { get; set; }

Defines the ParentId DataField of the DataSource.

C#
[Parameter]
public string ParentIdField { get; set; }

Defines the PercentCompleteField of the Data. Default value: "PercentComplete".

C#
[Parameter]
public string PercentCompleteField { get; set; }

Determines what the Gantt range calculation is based on.

C#
[Parameter]
public GanttRangeSnapTo RangeSnapTo { get; set; }

Defines the height of each row in the Gantt. Accepts a number and is applied as pixels.

C#
[Parameter]
public decimal RowHeight { get; set; }

SelectedView

IGanttView

C#
public IGanttView SelectedView { get; }

Specifies if header cells will render a button to display a column menu. Use ShowColumnMenu to disable the menu at column level.

C#
[Parameter]
public bool ShowColumnMenu { get; set; }

Defines whether a task tooltip is visible for the tasks in the Timeline.

C#
[Parameter]
public bool ShowTooltip { get; set; }

Defines whether the Component is sortable.

C#
[Parameter]
public bool Sortable { get; set; }

Defines the sort mode.

C#
[Parameter]
public SortMode SortMode { get; set; }

Defines the StartField of the Data. Default value: "Start".

C#
[Parameter]
public string StartField { get; set; }

TaskElements

List<TaskElement>

C#
public List<TaskElement> TaskElements { get; set; }

Defines the template that will be used to render items in the timeline view. Children: allows arbitrary content.

C#
[Parameter]
public RenderFragment<TItem> TaskTemplate { get; set; }

Defines the TitleField of the Data. Default value: "Title".

C#
[Parameter]
public string TitleField { get; set; }

Specifies the template for the content of the task tooltip. The @context of the template contains the model associated with the item.

C#
[Parameter]
public RenderFragment<object> TooltipTemplate { get; set; }

Defines the EditMode of the TreeList section. Supports None, Inline, Popup and Incell editing. The Default Option is Incell.

C#
[Parameter]
public GanttTreeListEditMode TreeListEditMode { get; set; }
C#
protected TreeListFilterMode TreeListFilterMode { get; }
C#
protected TreeListNewRowPosition TreeListNewRowPosition { get; }

Specifies the width of the TreeList panel in pixels or percentages.

C#
[Parameter]
public string TreeListWidth { get; set; }

Triggers when TreeList width has changed.

C#
[Parameter]
public EventCallback<string> TreeListWidthChanged { get; set; }

The currently selected view of the Gantt. Determines the layout of the timeline view.

C#
[Parameter]
public GanttView View { get; set; }

The handler that will be called when the currently selected view is changed.

C#
[Parameter]
public EventCallback<GanttView> ViewChanged { get; set; }

Defines the width of the Gantt.

C#
[Parameter]
public string Width { get; set; }