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

Defines the fluent API for configuring the GanttView settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class GanttViewBuilder

Inheritance: objectGanttViewBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public GanttViewBuilder(GanttView settings)
Parameters:settingsGanttView

Methods

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.Overrides the date option of the gantt.

C#
public GanttViewBuilder Date(DateTime value)
Parameters:valueDateTime

The value that configures the date.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
.Name("gantt")
.Views(v => v.DayView(dv => dv.Date(DateTime.Now)))
)

The template used to render the day slots in "day" and "week" views.

C#
public GanttViewBuilder DayHeaderTemplate(string value)
Parameters:valuestring

The value that configures the dayheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
.Name("gantt")
.Views(v => v.DayView(dv => dv.DayHeaderTemplate("Value")))
)

The template used to render the day slots in "day" and "week" views.

C#
public GanttViewBuilder DayHeaderTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the dayheadertemplate.

Returns:

GanttViewBuilder

The template used to render the day slots in "day" and "week" views.

C#
public GanttViewBuilder DayHeaderTemplateHandler(string value)
Parameters:valuestring

The value that configures the dayheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.DayHeaderTemplateHandler("Value")))
)

The template used to render the day slots in "day" and "week" views.

C#
public GanttViewBuilder DayHeaderTemplateId(string value)
Parameters:valuestring

The value that configures the dayheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.DayHeaderTemplateId("Value")))
)

The template used to render the day slots in "day" and "week" views.

C#
public GanttViewBuilder DayHeaderTemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the dayheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.DayHeaderTemplateView(Html.Partial("Value"))))
)

The template used to render the month slots in "month" and "year" views.

C#
public GanttViewBuilder MonthHeaderTemplate(string value)
Parameters:valuestring

The value that configures the monthheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.MonthHeaderTemplate("Value")))
)

The template used to render the month slots in "month" and "year" views.

C#
public GanttViewBuilder MonthHeaderTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the monthheadertemplate.

Returns:

GanttViewBuilder

The template used to render the month slots in "month" and "year" views.

C#
public GanttViewBuilder MonthHeaderTemplateHandler(string value)
Parameters:valuestring

The value that configures the monthheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.MonthHeaderTemplateHandler("Value")))
)

The template used to render the month slots in "month" and "year" views.

C#
public GanttViewBuilder MonthHeaderTemplateId(string value)
Parameters:valuestring

The value that configures the monthheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.MonthHeaderTemplateId("Value")))
)

The template used to render the month slots in "month" and "year" views.

C#
public GanttViewBuilder MonthHeaderTemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the monthheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.MonthHeaderTemplateView(Html.Partial("Value"))))
)

Configures the view range settings.

C#
public GanttViewBuilder Range(Action<GanttViewRangeSettingsBuilder> configurator)
Parameters:configuratorAction<GanttViewRangeSettingsBuilder>

The action that configures the range.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.Range(r =&gt; r.Start(DateTime.Now))))
)

The format used to display the start and end dates in the resize tooltip.

C#
public GanttViewBuilder ResizeTooltipFormat(string value)
Parameters:valuestring

The value that configures the resizetooltipformat.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.ResizeTooltipFormat("Value")))
)

If set to true the view will be initially selected by the Gantt component. The default selected view is "day".

C#
public GanttViewBuilder Selected(bool value)
Parameters:valuebool

The value that configures the selected.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.Selected(true)))
)

The size of the time slot headers. Values are treated as pixels.

C#
public GanttViewBuilder SlotSize(double value)
Parameters:valuedouble

The value that configures the slotsize.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.SlotSize(12)))
)

The template used to render the time slots in "day" view

C#
public GanttViewBuilder TimeHeaderTemplate(string value)
Parameters:valuestring

The value that configures the timeheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.TimeHeaderTemplate("Value")))
)

The template used to render the time slots in "day" view

C#
public GanttViewBuilder TimeHeaderTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the timeheadertemplate.

Returns:

GanttViewBuilder

The template used to render the time slots in "day" view

C#
public GanttViewBuilder TimeHeaderTemplateHandler(string value)
Parameters:valuestring

The value that configures the timeheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.TimeHeaderTemplateHandler("Value")))
)

The template used to render the time slots in "day" view

C#
public GanttViewBuilder TimeHeaderTemplateId(string value)
Parameters:valuestring

The value that configures the timeheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.TimeHeaderTemplateId("Value")))
)

The template used to render the time slots in "day" view

C#
public GanttViewBuilder TimeHeaderTemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the timeheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.TimeHeaderTemplateView(Html.Partial("Value"))))
)

The view type. Supported types are "day", "week", "month" and "year".

C#
public GanttViewBuilder Type(GanttViewType value)
Parameters:valueGanttViewType

The value that configures the type.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.Type(GanttViewType.Day)))
)

The template used to render the week slots in "week" and "month" views.

C#
public GanttViewBuilder WeekHeaderTemplate(string value)
Parameters:valuestring

The value that configures the weekheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.WeekHeaderTemplate("Value")))
)

The template used to render the week slots in "week" and "month" views.

C#
public GanttViewBuilder WeekHeaderTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the weekheadertemplate.

Returns:

GanttViewBuilder

The template used to render the week slots in "week" and "month" views.

C#
public GanttViewBuilder WeekHeaderTemplateHandler(string value)
Parameters:valuestring

The value that configures the weekheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.WeekHeaderTemplateHandler("Value")))
)

The template used to render the week slots in "week" and "month" views.

C#
public GanttViewBuilder WeekHeaderTemplateId(string value)
Parameters:valuestring

The value that configures the weekheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.WeekHeaderTemplateId("Value")))
)

The template used to render the week slots in "week" and "month" views.

C#
public GanttViewBuilder WeekHeaderTemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the weekheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.TimeHeaderTemplateId(Html.Partial("Value"))))
)

The template used to render the year slots in "year" view.

C#
public GanttViewBuilder YearHeaderTemplate(string value)
Parameters:valuestring

The value that configures the yearheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.YearHeaderTemplate("Value")))
)

The template used to render the year slots in "year" view.

C#
public GanttViewBuilder YearHeaderTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the yearheadertemplate.

Returns:

GanttViewBuilder

The template used to render the year slots in "year" view.

C#
public GanttViewBuilder YearHeaderTemplateHandler(string value)
Parameters:valuestring

The value that configures the yearheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.YearHeaderTemplateHandler("Value")))
)

The template used to render the year slots in "year" view.

C#
public GanttViewBuilder YearHeaderTemplateId(string value)
Parameters:valuestring

The value that configures the yearheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.YearHeaderTemplateId("Value")))
)

The template used to render the year slots in "year" view.

C#
public GanttViewBuilder YearHeaderTemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the yearheadertemplate.

Returns:

GanttViewBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Views(v =&gt; v.DayView(dv =&gt; dv.YearHeaderTemplateView(Html.Partial("Value"))))
)