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

Kendo UI Gantt TagHelper GanttTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("kendo-gantt")]
[RestrictChildren("assignments", new string[] { "columns", "current-time-marker", "editable", "messages", "pdf", "range", "toolbars", "tooltip", "views", "resources", "gantt-datasource", "dependency-datasource", "gantt-task-template" })]
public class GanttTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent, IDataBoundWidget<GanttDataSourceTagHelper>, ITemplateComponent

Inheritance: objectTagHelperTagHelperBaseGanttTagHelper

Implements: IDataBoundWidget<GanttDataSourceTagHelper>ITagHelperITagHelperComponentITemplateComponent

Inherited Members TagHelperBase.MinimumValidatorTagHelperBase.MaximumValidatorTagHelperBase.Init(TagHelperContext)TagHelperBase.Process(TagHelperContext, TagHelperOutput)TagHelperBase.GetInitializator()TagHelperBase.VerifySettings()TagHelperBase.SerializeTemplates()TagHelperBase.GenerateId(TagHelperOutput)TagHelperBase.CreateHandler(string)TagHelperBase.GetRangeValidationParameter<TValue>(ModelExplorer, string)TagHelperBase.ExtractEditFormat(string)TagHelperBase.ToDictionaryHandler(IDictionary<string, string>)TagHelperBase.AddSelfToTemplate(TagHelperContext)TagHelperBase.ViewContextTagHelperBase.GeneratorTagHelperBase.InitializerTagHelperBase.WriterTagHelperBase.ScriptAttributesTagHelperBase.NameTagHelperBase.IdTagHelperBase.SelectorTagHelperBase.IdPrefixTagHelperBase.IsInClientTemplateTagHelperBase.DeferredTagHelperBase.AsModuleTagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

    <kendo-gantt name="gantt" show-work-days="false" show-work-hours="false" snap="false" height="700">
       <tooltip visible="false" />
       <current-time-marker enabled="false" />
       <messages>
           <views day="MyDay" week="MyWeek" month="MyMonth" />
       </messages>
       <columns>
           <gantt-column field="title" title="Title" editable="true" sortable="true"></gantt-column>
           <gantt-column field="resources" title="Assigned Resources" editable="true" sortable="true"></gantt-column>
       </columns>
       <views>
           <gantt-view type="GanttViewType.Day"></gantt-view>
           <gantt-view type="GanttViewType.Week"></gantt-view>
           <gantt-view type="GanttViewType.Month" selected="true"></gantt-view>
       </views>
   </kendo-gantt>

Constructors

Initializes a new instance of the GanttTagHelper class.

C#
public GanttTagHelper(IKendoHtmlGenerator generator)
Parameters:generatorIKendoHtmlGenerator

Properties

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; }

The ID/Name of the GanttDataSource tag helper

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; }

The ID/Name of the GanttDependencyDataSource tag helper

C#
public string DependancyDatasourceId { get; set; }

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; }

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; }

The name of the JavaScript function that will handle the add event. Fired when a new task or a new dependency is about to be added.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnAdd { get; set; }

The name of the JavaScript function that will handle the cancel event. Fired when the user cancels tasks's cell editing by pressing the 'Esc' key.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnCancel { get; set; }

The name of the JavaScript function that will handle the change event. Fired when the user selects a task in the Gantt.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnChange { get; set; }

The name of the JavaScript function that will handle the columnHide event. Fires when the user hides a column. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public string OnColumnHide { get; set; }

The name of the JavaScript function that will handle the columnReorder event. Fires when the user changes the order of a column. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public string OnColumnReorder { get; set; }

The name of the JavaScript function that will handle the columnResize event. Fired when the user resizes a column.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnColumnResize { get; set; }

The name of the JavaScript function that will handle the columnShow event. Fires when the user shows a column. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public string OnColumnShow { get; set; }

The name of the JavaScript function that will handle the dataBinding event. Fired before the widget binds to its data source.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnDataBinding { get; set; }

The name of the JavaScript function that will handle the dataBound event. Fired when the widget is bound to data from its data source.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnDataBound { get; set; }

The name of the JavaScript function that will handle the edit event. Fired when the user starts task edit upon double click on a cell.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnEdit { get; set; }

The name of the JavaScript function that will handle the kendoKeydown event. Triggered when the user presses a keyboard key while the Gantt is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnKendoKeydown { get; set; }

The name of the JavaScript function that will handle the move event. Fired when the user is moving a task.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnMove { get; set; }

The name of the JavaScript function that will handle the moveEnd event. Fired when the user stops moving a task.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnMoveEnd { get; set; }

The name of the JavaScript function that will handle the moveStart event. Fired when the user starts to drag a task.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnMoveStart { get; set; }

The name of the JavaScript function that will handle the navigate event. Fired when the user changes the selected view of the Gantt.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnNavigate { get; set; }

The name of the JavaScript function that will handle the pdfExport event. Fired when the user clicks the "Export to PDF" toolbar button.

C#
public string OnPdfExport { get; set; }

The name of the JavaScript function that will handle the remove event. Fired when a task or a dependency is about to be removed.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnRemove { get; set; }

The name of the JavaScript function that will handle the resize event. Fired when the user is resizing a task.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnResize { get; set; }

The name of the JavaScript function that will handle the resizeEnd event. Fired when the user releases the mouse after resizing a task.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnResizeEnd { get; set; }

The name of the JavaScript function that will handle the resizeStart event. Fired when the user starts to resize a task.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnResizeStart { get; set; }

The name of the JavaScript function that will handle the save event. Fired when a task field is updated upon user interaction.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnSave { get; set; }

The name of the JavaScript function that will handle the togglePlannedTasks event. The event will be raised upon Toolbar PlannedTasks Switch click. As a result, the planned tasks will be either hidden or shown in the Gantt Timeline view. The event is preventable.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnTogglePlannedTasks { get; set; }

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; }

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 template used to render the gantt tasks.The fields which can be used in the template are the task fields This option expects the name of a JavaScript function that will be called to return the template.

C#
public string TaskTemplateHandler { get; set; }

The template used to render the gantt tasks.The fields which can be used in the template are the task fields This option expects the ID of the script element that contains the template.

C#
public string TaskTemplateId { get; set; }

The template used to render the gantt tasks.The fields which can be used in the template are the task fields This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent TaskTemplateView { get; set; }

Represents a collection of templates defined for the component.

C#
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }

Implements: ITemplateComponent.Templates

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

Gets the initialization script.

C#
protected override string GetInitializationScript()
Returns:

string

The initialization script.

Overrides: TagHelperBase.GetInitializationScript()

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelper.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

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

IDictionary<string, object>

Overrides: TagHelperBase.Serialize()

SerializeEvents method.

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

Dictionary<string, object>

Overrides: TagHelperBase.SerializeEvents()

SerializeSettings method.

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

Dictionary<string, object>

Overrides: TagHelperBase.SerializeSettings()

Writes the HTML output.

C#
protected override void WriteHtml(TagHelperOutput output)
Parameters:outputTagHelperOutput

The TagHelper output.

Overrides: TagHelperBase.WriteHtml(TagHelperOutput)