New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Kendo UI Gantt component

Definition

Namespace:Kendo.Mvc.UI

Assembly:Kendo.Mvc.dll

Type Parameters:

TTaskModel

TDependenciesModel

Syntax:

C#
public class Gantt<TTaskModel, TDependenciesModel> : WidgetBase, IHtmlAttributesContainer where TTaskModel : class, IGanttTask where TDependenciesModel : class, IGanttDependency

Inheritance: objectWidgetBaseGantt<TTaskModel, TDependenciesModel>

Implements: IHtmlAttributesContainer

Inherited Members WidgetBase.Render()WidgetBase.ToClientTemplate()WidgetBase.ToHtmlString()WidgetBase.VerifySettings()WidgetBase.WriteDeferredStyles(TextWriter)WidgetBase.DeferStyles()WidgetBase.ProcessSettings()WidgetBase.GetHtml(bool)WidgetBase.GetInitializator()WidgetBase.RenderHtml(TextWriter)WidgetBase.GetElement()WidgetBase.WriteLicensingScript(TextWriter)WidgetBase.WriteMvvmHtml(TextWriter)WidgetBase.WriteDeferredScriptInitialization()WidgetBase.GetService<TService>()WidgetBase.EventsWidgetBase.IdWidgetBase.SanitezeIdWidgetBase.WriterWidgetBase.InitializerWidgetBase.IsInClientTemplateWidgetBase.IsSelfInitializedWidgetBase.HasDeferredInitializationWidgetBase.HtmlAttributesWidgetBase.ScriptAttributesWidgetBase.HtmlHelperWidgetBase.ModelMetadataProviderWidgetBase.NameWidgetBase.ExplorerWidgetBase.SelectorWidgetBase.IdPrefixWidgetBase.ViewContextWidgetBase.ValueProviderWidgetBase.GeneratorWidgetBase.UrlGeneratorWidgetBase.HtmlEncoderWidgetBase.HasClientComponentWidgetBase.UseMvvmInitializationobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the Gantt<TTaskModel, TDependenciesModel> class.

C#
public Gantt(ViewContext viewContext)
Parameters:viewContextViewContext

Properties

Assignments member.

C#
public GanttAssignmentsSettings Assignments { get; }

If set to false the widget will not bind to the data source during initialization. In this case data binding will occur when the change event of the data source is fired. By default the widget will bind to the data source specified in the configuration.

C#
public bool? AutoBind { get; set; }

If set to true, the Gantt displays the column menu when the user clicks the Chevron icon in the column headers. The column menu allows the user to show and hide columns, and, if filtering and sorting are enabled, filter and sort the data. By default, the column menu is disabled. Can be set to a JavaScript object which represents the column menu configuration.

C#
public bool? ColumnMenu { get; set; }

Defines the width of the column resize handle in pixels. Apply a larger value for easier grasping.

C#
public double? ColumnResizeHandleWidth { get; set; }

Columns

List<GanttColumn<TTaskModel, TDependenciesModel>>

The configuration of the Gantt columns. An array of JavaScript objects or strings. A JavaScript objects are interpreted as column configurations. Strings are interpreted as thefield to which the column is bound. The Gantt will create a column for every item of the array.

C#
public List<GanttColumn<TTaskModel, TDependenciesModel>> Columns { get; set; }

CurrentTimeMarker

GanttCurrentTimeMarkerSettings<TTaskModel, TDependenciesModel>

If set to false the "current time" marker of the Gantt would not be displayed.

C#
public GanttCurrentTimeMarkerSettings<TTaskModel, TDependenciesModel> CurrentTimeMarker { get; }

Gets or sets the DataSource.

C#
public DataSource DataSource { get; }

Gets or sets the DataSourceId.

C#
public string DataSourceId { get; set; }

If set to some date and it is between the range start and range end of the selected view, the timeline of the currently selected view is scrolled to start from this date.

C#
public DateTime? Date { get; set; }

Gets or sets the DependenciesDataSource.

C#
public DataSource DependenciesDataSource { get; }

Gets or sets the DependenciesDataSourceId.

C#
public string DependenciesDataSourceId { get; set; }

Editable

GanttEditableSettings<TTaskModel, TDependenciesModel>

If set to false the user won't be able to create, modify or delete tasks and dependencies.

C#
public GanttEditableSettings<TTaskModel, TDependenciesModel> Editable { get; }

If set to true, the user can filter the data source by using the Gantt filter menu. By default, filtering is disabled. Can be set to a JavaScript object which represents the filter menu configuration.

C#
public bool? Filterable { get; set; }

The height of the widget. Numeric values are treated as pixels.

C#
public double? Height { get; set; }

The span of an hour slot.

C#
public double? HourSpan { get; set; }

The width of the task list. Numeric values are treated as pixels.

C#
public string ListWidth { get; set; }

Messages

GanttMessagesSettings<TTaskModel, TDependenciesModel>

The configuration of the Gantt messages. Use this option to customize or localize the Gantt messages.

C#
public GanttMessagesSettings<TTaskModel, TDependenciesModel> Messages { get; }

If set to true the user could navigate the widget using the keyboard. By default keyboard navigation is enabled.

C#
public bool? Navigatable { get; set; }

Pdf

GanttPdfSettings<TTaskModel, TDependenciesModel>

Configures the Kendo UI Gantt PDF export settings.

C#
public GanttPdfSettings<TTaskModel, TDependenciesModel> Pdf { get; }

Range

GanttRangeSettings<TTaskModel, TDependenciesModel>

Configures the Kendo UI Gantt range settings.

C#
public GanttRangeSettings<TTaskModel, TDependenciesModel> Range { get; }

If set to true, the user can reorder the columns in the GanttList section of the widget by dragging their header cells. By default, reordering is disabled.

C#
public bool? Reorderable { get; set; }

If set to true allows users to resize columns by dragging their header borders. By default resizing is disabled.

C#
public bool? Resizable { get; set; }

Resources member.

C#
public GanttResourcesSettings Resources { get; }

The height of the table rows. Numeric values are treated as pixels.

C#
public double? RowHeight { get; set; }

If set to false the user won't be able to select tasks in the Gantt. By default selection is enabled and triggers the change event.

C#
public bool? Selectable { get; set; }

If set to true, the Gantt Timeline will render both the planned and the actual execution of tasks. In order to display properly, the Planned vs. Actual view would need the plannedStart and plannedEnd date fields for tasks to be set.

C#
public bool? ShowPlannedTasks { get; set; }

If set to false, Gantt views will show all days of the week. By default the views display only business days.

C#
public bool? ShowWorkDays { get; set; }

If set to false, the day view will show all hours of the day. By default the view displays only business hours.

C#
public bool? ShowWorkHours { get; set; }

If set to true the Gantt will snap tasks to the nearest slot during dragging (resizing or moving). Set it to false to allow free moving and resizing of tasks.

C#
public bool? Snap { get; set; }

The template used to render the gantt tasks.The fields which can be used in the template are the task fields

C#
public string TaskTemplate { get; set; }

The handler that returns the template used for TaskTemplate

C#
public string TaskTemplateHandler { get; set; }

The id of the script element used for TaskTemplate

C#
public string TaskTemplateId { get; set; }

Toolbar

List<GanttToolbar<TTaskModel, TDependenciesModel>>

If a String value is assigned to the toolbar configuration option, it will be treated as a single string template for the whole Gantt Toolbar, and the string value will be passed as an argument to a kendo.template() function.If a Function value is assigned (it may be a kendo.template() function call or a generic function reference), then the return value of the function will be used to render the Gantt Toolbar contents.If an Array value is assigned, it will be treated as the list of commands displayed in the Gantt Toolbar. Commands can be custom or built-in ("append", "pdf", "plannedTasks").The "append" command adds a new task to the gantt.The "pdf" command exports the gantt in PDF format.The "plannedTasks" command will render the plannedTasks Switch on the Toolbar. That Switch allows the user to turn on and off the Planned vs. Actual view in the Timeline of the Gantt. When turned on, that view will render both the planned and the actual duration of all tasks. When enabled, plannedStart and plannedEnd date fields of tasks are required to properly render planned duration.

C#
public List<GanttToolbar<TTaskModel, TDependenciesModel>> Toolbar { get; set; }

Tooltip

GanttTooltipSettings<TTaskModel, TDependenciesModel>

The task tooltip configuration options.

C#
public GanttTooltipSettings<TTaskModel, TDependenciesModel> Tooltip { get; }

Views

List<GanttView<TTaskModel, TDependenciesModel>>

The views displayed by the Gantt and their configuration. The array items can be either objects specifying the view configuration or strings representing the view types (assuming default configuration). By default the Kendo UI Gantt widget displays "day", "week", and "month" views.

C#
public List<GanttView<TTaskModel, TDependenciesModel>> Views { get; set; }

Sets the end of the work day.

C#
public DateTime? WorkDayEnd { get; set; }

Sets the start of the work day.

C#
public DateTime? WorkDayStart { get; set; }

The end of working week (index based).

C#
public double? WorkWeekEnd { get; set; }

The start of working week (index based).

C#
public double? WorkWeekStart { get; set; }

Methods

Serializes the component settings to a dictionary.

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

A dictionary of settings.

Overrides: WidgetBase.Serialize()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: WidgetBase.SerializeSettings()

Writes the HTML content.

C#
protected override void WriteHtml(TextWriter writer)
Parameters:writerTextWriter

The text writer.

Overrides: WidgetBase.WriteHtml(TextWriter)

WriteInitializationScript method.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

Overrides: WidgetBase.WriteInitializationScript(TextWriter)