GanttBuilder

Properties

WriteAction - Func

Methods

DataSource(System.Action)

Configures the DataSource options.

Parameters

configurator - System.Action<GanttDataSourceBuilder>

The DataSource configurator action.

RETURNS

A GanttBuilder instance that can be used to configure the Gantt component.

Example

Razor
 
             @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("Gantt")
                .DataSource(source =>
                {
                    source.Read(read =>
                    {
                        read.Action("Read", "Gantt");
                    });
                })
            )
             

DataSource(System.String)

Passes the ID of a predefined DataSource instance.

Parameters

dataSourceId - System.String

The DataSource ID value.

RETURNS

A GanttBuilder instance that can be used to configure the Gantt component.

Example

Razor
 
             @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .DataSource("DataSourceId")
            )
             

DependenciesDataSource(System.String)

Passes the ID of a predefined DependenciesDataSource instance.

Parameters

dataSourceId - System.String

The DependenciesDataSource ID value.

RETURNS

A GanttBuilder instance that can be used to configure the Gantt component.

Example

Razor
 
             @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .DependenciesDataSource("DependenciesDataSourceId")
            )
             

DependenciesDataSource(System.Action)

Configures the dependencies DataSource options.

Parameters

configurator - System.Action<GanttDependenciesDataSourceBuilder>

The DataSource configurator action.

RETURNS

A GanttBuilder instance that can be used to configure the Gantt component.

Example

Razor
 
            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("Gantt")
                .DataSource(source =>
                {
                    source.Read(read =>
                    {
                        read.Action("Read", "Gantt");
                    });
                })
                .DependenciesDataSource(source =>
                {
                    source.Read(read =>
                    {
                        read.Action("Read", "Gantt");
                    });
                })
             )
             

Assignments(System.Action)

The configuration of the assignments of the gantt resources. An assignment is a one-to-one mapping between a gantt task and a gantt resource containing the number of units for which a resource is assigned to a task.

Parameters

configurator - System.Action<GanttAssignmentsSettingsBuilder>

The configurator for the assignments setting.

RETURNS

A GanttBuilder instance that can be used to configure the Gantt component.

Example

Razor
 
            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Assignments<ResourceAssignmentViewModel>(a => a
                    .DataResourceIdField("ResourceID")
                )
            )
             

Resources(System.Action)

The configuration of the gantt resource(s). A gantt resource is optional metadata that can be associated with a gantt task.

Parameters

configurator - System.Action<GanttResourcesSettingsBuilder>

The configurator for the resources setting.

RETURNS

A GanttBuilder instance that can be used to configure the Gantt component.

Example

Razor
 
            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Resources(r=> r.DataFormatField("Field"))
            )
             

Enables keyboard navigation by the widget.

AutoBind(System.Boolean)

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.

Parameters

value - System.Boolean

The value for AutoBind

RETURNS

Returns the current GanttBuilder instance.

ColumnResizeHandleWidth(System.Double)

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

Parameters

value - System.Double

The value for ColumnResizeHandleWidth

RETURNS

Returns the current GanttBuilder instance.

ColumnMenu(System.Boolean)

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.

Parameters

value - System.Boolean

The value for ColumnMenu

RETURNS

Returns the current GanttBuilder instance.

ColumnMenu()

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.

RETURNS

Returns the current GanttBuilder instance.

Columns(System.Action)

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.

Parameters

configurator - System.Action<GanttColumnFactory>

The configurator for the columns setting.

RETURNS

Returns the current instance of GanttBuilder .

CurrentTimeMarker(System.Action)

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

Parameters

configurator - System.Action<GanttCurrentTimeMarkerSettingsBuilder>

The configurator for the currenttimemarker setting.

RETURNS

Returns the current instance of GanttBuilder .

CurrentTimeMarker(System.Boolean)

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

Parameters

enabled - System.Boolean

Enables or disables the currenttimemarker option.

RETURNS

Returns the current instance of GanttCurrentTimeMarkerSettingsBuilder .

Date(System.DateTime)

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.

Parameters

value - System.DateTime

The value for Date

RETURNS

Returns the current GanttBuilder instance.

Editable(System.Action)

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

Parameters

configurator - System.Action<GanttEditableSettingsBuilder>

The configurator for the editable setting.

RETURNS

Returns the current instance of GanttBuilder .

Editable(System.Boolean)

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

Parameters

enabled - System.Boolean

Enables or disables the editable option.

RETURNS

Returns the current instance of GanttEditableSettingsBuilder .

Filterable(System.Boolean)

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.

Parameters

value - System.Boolean

The value for Filterable

RETURNS

Returns the current GanttBuilder instance.

Filterable()

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.

RETURNS

Returns the current GanttBuilder instance.

Reorderable(System.Boolean)

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.

Parameters

value - System.Boolean

The value for Reorderable

RETURNS

Returns the current GanttBuilder instance.

Reorderable()

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.

RETURNS

Returns the current GanttBuilder instance.

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

Parameters

value - System.Boolean

The value for Navigatable

RETURNS

Returns the current GanttBuilder instance.

WorkDayStart(System.DateTime)

Sets the start of the work day.

Parameters

value - System.DateTime

The value for WorkDayStart

RETURNS

Returns the current GanttBuilder instance.

WorkDayEnd(System.DateTime)

Sets the end of the work day.

Parameters

value - System.DateTime

The value for WorkDayEnd

RETURNS

Returns the current GanttBuilder instance.

WorkWeekStart(System.Double)

The start of working week (index based).

Parameters

value - System.Double

The value for WorkWeekStart

RETURNS

Returns the current GanttBuilder instance.

WorkWeekEnd(System.Double)

The end of working week (index based).

Parameters

value - System.Double

The value for WorkWeekEnd

RETURNS

Returns the current GanttBuilder instance.

HourSpan(System.Double)

The span of an hour slot.

Parameters

value - System.Double

The value for HourSpan

RETURNS

Returns the current GanttBuilder instance.

Snap(System.Boolean)

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.

Parameters

value - System.Boolean

The value for Snap

RETURNS

Returns the current GanttBuilder instance.

Height(System.Double)

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

Parameters

value - System.Double

The value for Height

RETURNS

Returns the current GanttBuilder instance.

ListWidth(System.String)

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

Parameters

value - System.String

The value for ListWidth

RETURNS

Returns the current GanttBuilder instance.

Messages(System.Action)

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

Parameters

configurator - System.Action<GanttMessagesSettingsBuilder>

The configurator for the messages setting.

RETURNS

Returns the current instance of GanttBuilder .

Pdf(System.Action)

Configures the Kendo UI Gantt PDF export settings.

Parameters

configurator - System.Action<GanttPdfSettingsBuilder>

The configurator for the pdf setting.

RETURNS

Returns the current instance of GanttBuilder .

Range(System.Action)

Configures the Kendo UI Gantt range settings.

Parameters

configurator - System.Action<GanttRangeSettingsBuilder>

The configurator for the range setting.

RETURNS

Returns the current instance of GanttBuilder .

Resizable(System.Boolean)

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

Parameters

value - System.Boolean

The value for Resizable

RETURNS

Returns the current GanttBuilder instance.

Resizable()

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

RETURNS

Returns the current GanttBuilder instance.

Selectable(System.Boolean)

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.

Parameters

value - System.Boolean

The value for Selectable

RETURNS

Returns the current GanttBuilder instance.

ShowPlannedTasks(System.Boolean)

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.

Parameters

value - System.Boolean

The value for ShowPlannedTasks

RETURNS

Returns the current GanttBuilder instance.

ShowPlannedTasks()

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.

RETURNS

Returns the current GanttBuilder instance.

ShowWorkDays(System.Boolean)

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

Parameters

value - System.Boolean

The value for ShowWorkDays

RETURNS

Returns the current GanttBuilder instance.

ShowWorkHours(System.Boolean)

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

Parameters

value - System.Boolean

The value for ShowWorkHours

RETURNS

Returns the current GanttBuilder instance.

TaskTemplate(System.String)

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

Parameters

value - System.String

The value for TaskTemplate

RETURNS

Returns the current GanttBuilder instance.

TaskTemplateId(System.String)

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

Parameters

templateId - System.String

The ID of the template element for TaskTemplate

RETURNS

Returns the current GanttBuilder instance.

TaskTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)

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

Parameters

templateView - Microsoft.AspNetCore.Html.IHtmlContent

The view that contains the template for TaskTemplate

RETURNS

Returns the current GanttBuilder instance.

TaskTemplateHandler(System.String)

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

Parameters

templateHandler - System.String

The handler that returs the template for TaskTemplate

RETURNS

Returns the current GanttBuilder instance.

TaskTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)

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

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the tasktemplate.

RETURNS

Returns the current GanttBuilder instance.

Toolbar(System.Action)

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.

Parameters

configurator - System.Action<GanttToolbarFactory>

The configurator for the toolbar setting.

RETURNS

Returns the current instance of GanttBuilder .

Tooltip(System.Action)

The task tooltip configuration options.

Parameters

configurator - System.Action<GanttTooltipSettingsBuilder>

The configurator for the tooltip setting.

RETURNS

Returns the current instance of GanttBuilder .

Views(System.Action)

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.

Parameters

configurator - System.Action<GanttViewFactory>

The configurator for the views setting.

RETURNS

Returns the current instance of GanttBuilder .

RowHeight(System.Double)

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

Parameters

value - System.Double

The value for RowHeight

RETURNS

Returns the current GanttBuilder instance.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<GanttEventBuilder>

The client events action.

RETURNS

Returns the current GanttBuilder instance.

Example

Razor
 
            @(Html.Kendo().Gantt()
                  .Name("Gantt")
                  .Events(events => events
                      .DataBinding("onDataBinding")
                  )
            )
             

ToComponent()

Returns the internal view component.

RETURNS

The instance that represents the component.

Expression(System.String)

Sets the name of the component.

Parameters

modelExpression - System.String

RETURNS

Returns the current instance.

Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)

Sets the name of the component.

Parameters

modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer

RETURNS

Returns the current instance.

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name.

RETURNS

Returns the current instance.

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with

Parameters

deferred - System.Boolean

RETURNS

Returns a DeferredWidgetBuilder instance.

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

RETURNS

Returns the current instance.

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The HTML attributes.

RETURNS

Returns the current instance.

ScriptAttributes(System.Object,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Object

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

RETURNS

Returns the current instance.

ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

RETURNS

Returns the current instance.

Render()

Renders the component in place.

ToHtmlString()

Returns the HTML representation of the component.

WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)

Parameters

writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder

ToClientTemplate()

Returns the client template for the component.

AsModule(System.Boolean)

Specifies whether the initialization script of the component will be rendered as a JavaScript module.

Parameters

value - System.Boolean

RETURNS

Returns the current instance.

In this article
PropertiesWriteAction - FuncMethodsDataSource(System.Action)DataSource(System.String)DependenciesDataSource(System.String)DependenciesDataSource(System.Action)Assignments(System.Action)Resources(System.Action)Navigatable()AutoBind(System.Boolean)ColumnResizeHandleWidth(System.Double)ColumnMenu(System.Boolean)ColumnMenu()Columns(System.Action)CurrentTimeMarker(System.Action)CurrentTimeMarker(System.Boolean)Date(System.DateTime)Editable(System.Action)Editable(System.Boolean)Filterable(System.Boolean)Filterable()Reorderable(System.Boolean)Reorderable()Navigatable(System.Boolean)WorkDayStart(System.DateTime)WorkDayEnd(System.DateTime)WorkWeekStart(System.Double)WorkWeekEnd(System.Double)HourSpan(System.Double)Snap(System.Boolean)Height(System.Double)ListWidth(System.String)Messages(System.Action)Pdf(System.Action)Range(System.Action)Resizable(System.Boolean)Resizable()Selectable(System.Boolean)ShowPlannedTasks(System.Boolean)ShowPlannedTasks()ShowWorkDays(System.Boolean)ShowWorkHours(System.Boolean)TaskTemplate(System.String)TaskTemplateId(System.String)TaskTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)TaskTemplateHandler(System.String)TaskTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)Toolbar(System.Action)Tooltip(System.Action)Views(System.Action)RowHeight(System.Double)Events(System.Action)ToComponent()Expression(System.String)Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)Name(System.String)Deferred(System.Boolean)HtmlAttributes(System.Object)HtmlAttributes(System.Collections.Generic.IDictionary)ScriptAttributes(System.Object,System.Boolean)ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)Render()ToHtmlString()WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)ToClientTemplate()AsModule(System.Boolean)
Not finding the help you need?
Contact Support