Defines the fluent API for configuring the Kendo UI Gantt
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Type Parameters:
TTaskModel
TDependenciesModel
Syntax:
public class GanttBuilder<TTaskModel, TDependenciesModel> : WidgetBuilderBase<Gantt<TTaskModel, TDependenciesModel>, GanttBuilder<TTaskModel, TDependenciesModel>>, IHtmlContent where TTaskModel : class, IGanttTask where TDependenciesModel : class, IGanttDependency
Inheritance: objectHelperResultWidgetBuilderBase<Gantt<TTaskModel, TDependenciesModel>, GanttBuilder<TTaskModel, TDependenciesModel>>GanttBuilder<TTaskModel, TDependenciesModel>
Implements:
Inherited Members
Constructors
Initializes a new instance of the GanttBuilder<TTaskModel, TDependenciesModel> class.
public GanttBuilder(Gantt<TTaskModel, TDependenciesModel> component)
Methods
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.
public GanttBuilder<TTaskModel, TDependenciesModel> Assignments<TAssingmentModel>(Action<GanttAssignmentsSettingsBuilder<TAssingmentModel>> configurator) where TAssingmentModel : class
The configurator for the assignments setting.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
A GanttBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt component.
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.
public GanttBuilder<TTaskModel, TDependenciesModel> AutoBind(bool value)
The value for AutoBind
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
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.
public GanttBuilder<TTaskModel, TDependenciesModel> ColumnMenu()
GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
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.
public GanttBuilder<TTaskModel, TDependenciesModel> ColumnMenu(bool value)
The value for ColumnMenu
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
Defines the width of the column resize handle in pixels. Apply a larger value for easier grasping.
public GanttBuilder<TTaskModel, TDependenciesModel> ColumnResizeHandleWidth(double value)
The value for ColumnResizeHandleWidth
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
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.
public GanttBuilder<TTaskModel, TDependenciesModel> Columns(Action<GanttColumnFactory<TTaskModel, TDependenciesModel>> configurator)
The GanttColumnFactory<TTaskModel, TDependenciesModel> for the columns setting.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current instance of GanttBuilder<TTaskModel, TDependenciesModel> .
If set to false the "current time" marker of the Gantt would not be displayed.
public GanttBuilder<TTaskModel, TDependenciesModel> CurrentTimeMarker(Action<GanttCurrentTimeMarkerSettingsBuilder<TTaskModel, TDependenciesModel>> configurator)
The GanttCurrentTimeMarkerSettingsBuilder<TTaskModel, TDependenciesModel> for the currenttimemarker setting.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current instance of GanttBuilder<TTaskModel, TDependenciesModel> .
If set to false the "current time" marker of the Gantt would not be displayed.
public GanttBuilder<TTaskModel, TDependenciesModel> CurrentTimeMarker(bool enabled)
Enables or disables the currenttimemarker option.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current instance of GanttCurrentTimeMarkerSettingsBuilder<TTaskModel, TDependenciesModel> .
Configures the DataSource options.
public GanttBuilder<TTaskModel, TDependenciesModel> DataSource(Action<GanttDataSourceBuilder<TTaskModel>> configurator)
The DataSource configurator action.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
A GanttBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt component.
Passes the ID of a predefined DataSource instance.
public GanttBuilder<TTaskModel, TDependenciesModel> DataSource(string dataSourceId)
The DataSource ID value.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
A GanttBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt component.
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.
public GanttBuilder<TTaskModel, TDependenciesModel> Date(DateTime value)
The value for Date
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
Configures the dependencies DataSource options.
public GanttBuilder<TTaskModel, TDependenciesModel> DependenciesDataSource(Action<GanttDependenciesDataSourceBuilder<TDependenciesModel>> configurator)
The DataSource configurator action.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
A GanttBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt component.
Passes the ID of a predefined DependenciesDataSource instance.
public GanttBuilder<TTaskModel, TDependenciesModel> DependenciesDataSource(string dataSourceId)
The DependenciesDataSource ID value.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
A GanttBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt component.
If set to false the user won't be able to create, modify or delete tasks and dependencies.
public GanttBuilder<TTaskModel, TDependenciesModel> Editable(Action<GanttEditableSettingsBuilder<TTaskModel, TDependenciesModel>> configurator)
The GanttEditableSettingsBuilder<TTaskModel, TDependenciesModel> for the editable setting.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current instance of GanttBuilder<TTaskModel, TDependenciesModel> .
If set to false the user won't be able to create, modify or delete tasks and dependencies.
public GanttBuilder<TTaskModel, TDependenciesModel> Editable(bool enabled)
Enables or disables the editable option.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current instance of GanttEditableSettingsBuilder<TTaskModel, TDependenciesModel> .
Configures the client-side events.
public GanttBuilder<TTaskModel, TDependenciesModel> Events(Action<GanttEventBuilder> configurator)
The client events action.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
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.
public GanttBuilder<TTaskModel, TDependenciesModel> Filterable()
GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
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.
public GanttBuilder<TTaskModel, TDependenciesModel> Filterable(bool value)
The value for Filterable
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
The height of the widget. Numeric values are treated as pixels.
public GanttBuilder<TTaskModel, TDependenciesModel> Height(double value)
The value for Height
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
The span of an hour slot.
public GanttBuilder<TTaskModel, TDependenciesModel> HourSpan(double value)
The value for HourSpan
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
The width of the task list. Numeric values are treated as pixels.
public GanttBuilder<TTaskModel, TDependenciesModel> ListWidth(string value)
The value for ListWidth
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
The configuration of the Gantt messages. Use this option to customize or localize the Gantt messages.
public GanttBuilder<TTaskModel, TDependenciesModel> Messages(Action<GanttMessagesSettingsBuilder<TTaskModel, TDependenciesModel>> configurator)
The GanttMessagesSettingsBuilder<TTaskModel, TDependenciesModel> for the messages setting.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current instance of GanttBuilder<TTaskModel, TDependenciesModel> .
Enables keyboard navigation by the widget.
[Obsolete("As of v2023.2.718 keyboard navigation is enabled by default. To disable keyboard navigation use Navigatable(bool value) overload.")]
public GanttBuilder<TTaskModel, TDependenciesModel> Navigatable()
GanttBuilder<TTaskModel, TDependenciesModel>
If set to true the user could navigate the widget using the keyboard. By default keyboard navigation is enabled.
public GanttBuilder<TTaskModel, TDependenciesModel> Navigatable(bool value)
The value for Navigatable
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
Configures the Kendo UI Gantt PDF export settings.
public GanttBuilder<TTaskModel, TDependenciesModel> Pdf(Action<GanttPdfSettingsBuilder<TTaskModel, TDependenciesModel>> configurator)
The GanttPdfSettingsBuilder<TTaskModel, TDependenciesModel> for the pdf setting.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current instance of GanttBuilder<TTaskModel, TDependenciesModel> .
Configures the Kendo UI Gantt range settings.
public GanttBuilder<TTaskModel, TDependenciesModel> Range(Action<GanttRangeSettingsBuilder<TTaskModel, TDependenciesModel>> configurator)
The GanttRangeSettingsBuilder<TTaskModel, TDependenciesModel> for the range setting.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current instance of GanttBuilder<TTaskModel, TDependenciesModel> .
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.
public GanttBuilder<TTaskModel, TDependenciesModel> Reorderable()
GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
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.
public GanttBuilder<TTaskModel, TDependenciesModel> Reorderable(bool value)
The value for Reorderable
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
If set to true allows users to resize columns by dragging their header borders. By default resizing is disabled.
public GanttBuilder<TTaskModel, TDependenciesModel> Resizable()
GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
If set to true allows users to resize columns by dragging their header borders. By default resizing is disabled.
public GanttBuilder<TTaskModel, TDependenciesModel> Resizable(bool value)
The value for Resizable
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
The configuration of the gantt resource(s). A gantt resource is optional metadata that can be associated with a gantt task.
public GanttBuilder<TTaskModel, TDependenciesModel> Resources(Action<GanttResourcesSettingsBuilder> configurator)
The configurator for the resources setting.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
A GanttBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt component.
The height of the table rows. Numeric values are treated as pixels.
public GanttBuilder<TTaskModel, TDependenciesModel> RowHeight(double value)
The value for RowHeight
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
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.
public GanttBuilder<TTaskModel, TDependenciesModel> Selectable(bool value)
The value for Selectable
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
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.
public GanttBuilder<TTaskModel, TDependenciesModel> ShowPlannedTasks()
GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
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.
public GanttBuilder<TTaskModel, TDependenciesModel> ShowPlannedTasks(bool value)
The value for ShowPlannedTasks
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
If set to false, Gantt views will show all days of the week. By default the views display only business days.
public GanttBuilder<TTaskModel, TDependenciesModel> ShowWorkDays(bool value)
The value for ShowWorkDays
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
If set to false, the day view will show all hours of the day. By default the view displays only business hours.
public GanttBuilder<TTaskModel, TDependenciesModel> ShowWorkHours(bool value)
The value for ShowWorkHours
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
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.
public GanttBuilder<TTaskModel, TDependenciesModel> Snap(bool value)
The value for Snap
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
The template used to render the gantt tasks.The fields which can be used in the template are the task fields
public GanttBuilder<TTaskModel, TDependenciesModel> TaskTemplate(string value)
The value for TaskTemplate
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
The template used to render the gantt tasks.The fields which can be used in the template are the task fields
public GanttBuilder<TTaskModel, TDependenciesModel> TaskTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the tasktemplate.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
The template used to render the gantt tasks.The fields which can be used in the template are the task fields
public GanttBuilder<TTaskModel, TDependenciesModel> TaskTemplateHandler(string templateHandler)
The handler that returs the template for TaskTemplate
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
The template used to render the gantt tasks.The fields which can be used in the template are the task fields
public GanttBuilder<TTaskModel, TDependenciesModel> TaskTemplateId(string templateId)
The ID of the template element for TaskTemplate
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
The template used to render the gantt tasks.The fields which can be used in the template are the task fields
public GanttBuilder<TTaskModel, TDependenciesModel> TaskTemplateView(IHtmlContent templateView)
The view that contains the template for TaskTemplate
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
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.
public GanttBuilder<TTaskModel, TDependenciesModel> Toolbar(Action<GanttToolbarFactory<TTaskModel, TDependenciesModel>> configurator)
The GanttToolbarFactory<TTaskModel, TDependenciesModel> for the toolbar setting.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current instance of GanttBuilder<TTaskModel, TDependenciesModel> .
The task tooltip configuration options.
public GanttBuilder<TTaskModel, TDependenciesModel> Tooltip(Action<GanttTooltipSettingsBuilder<TTaskModel, TDependenciesModel>> configurator)
The GanttTooltipSettingsBuilder<TTaskModel, TDependenciesModel> for the tooltip setting.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current instance of GanttBuilder<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.
public GanttBuilder<TTaskModel, TDependenciesModel> Views(Action<GanttViewFactory<TTaskModel, TDependenciesModel>> configurator)
The GanttViewFactory<TTaskModel, TDependenciesModel> for the views setting.
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current instance of GanttBuilder<TTaskModel, TDependenciesModel> .
Sets the end of the work day.
public GanttBuilder<TTaskModel, TDependenciesModel> WorkDayEnd(DateTime value)
The value for WorkDayEnd
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
Sets the start of the work day.
public GanttBuilder<TTaskModel, TDependenciesModel> WorkDayStart(DateTime value)
The value for WorkDayStart
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
The end of working week (index based).
public GanttBuilder<TTaskModel, TDependenciesModel> WorkWeekEnd(double value)
The value for WorkWeekEnd
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.
The start of working week (index based).
public GanttBuilder<TTaskModel, TDependenciesModel> WorkWeekStart(double value)
The value for WorkWeekStart
Returns:GanttBuilder<TTaskModel, TDependenciesModel>
Returns the current GanttBuilder<TTaskModel, TDependenciesModel> instance.