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

Defines the fluent API for configuring the GanttToolbar settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class GanttToolbarBuilder

Inheritance: objectGanttToolbarBuilder

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

Constructors

C#
public GanttToolbarBuilder(GanttToolbar settings)
Parameters:settingsGanttToolbar

Methods

The name of the toolbar command. Either a built-in ("append" and "pdf") or custom. The name is reflected in one of the CSS classes, which is applied to the button - k-gantt-name. This class can be used to obtain reference to the button after Gantt initialization and attach click handlers.

C#
public GanttToolbarBuilder Name(string value)
Parameters:valuestring

The value that configures the name.

Returns:

GanttToolbarBuilder

Example:
C#
@(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
.Name("gantt")
.Toolbar(t => t.Add().Name("name"))
)

The template which renders the command. By default renders a button.

C#
public GanttToolbarBuilder Template(string value)
Parameters:valuestring

The value that configures the template.

Returns:

GanttToolbarBuilder

Example:
C#
@(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
.Name("gantt")
.Toolbar(t => t.Add().Template("template"))
)

The template which renders the command. By default renders a button.

C#
public GanttToolbarBuilder Template<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the template.

Returns:

GanttToolbarBuilder

The template which renders the command. By default renders a button.

C#
public GanttToolbarBuilder TemplateHandler(string value)
Parameters:valuestring

The value that configures the template.

Returns:

GanttToolbarBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Toolbar(t =&gt; t.Add().TemplateHandler("templateHandler"))
)

The template which renders the command. By default renders a button.

C#
public GanttToolbarBuilder TemplateId(string value)
Parameters:valuestring

The value that configures the template.

Returns:

GanttToolbarBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Toolbar(t =&gt; t.Add().TemplateId("templateID"))
)

The template which renders the command. By default renders a button.

C#
public GanttToolbarBuilder TemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the template.

Returns:

GanttToolbarBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Toolbar(t =&gt; t.Add().TemplateView(Html.Partial("TemplateView")))
)

The text displayed by the command button. If not set the name` option would be used as the button text instead.

C#
public GanttToolbarBuilder Text(string value)
Parameters:valuestring

The value that configures the text.

Returns:

GanttToolbarBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Toolbar(t =&gt; t.Add().Add()Text("text"))
)