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

GanttToolbarBuilder

Methods

Name(System.String)

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.

Parameters

value - System.String

The value that configures the name.

Example


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

Template(System.String)

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

Parameters

value - System.String

The value that configures the template.

Example


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

TemplateId(System.String)

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

Parameters

value - System.String

The value that configures the template.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Toolbar(t => t.Add().TemplateId("templateID"))
            )

TemplateView(System.Web.Mvc.MvcHtmlString)

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

Parameters

value - System.Web.Mvc.MvcHtmlString

The value that configures the template.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Toolbar(t => t.Add().TemplateView(Html.Partial("TemplateView")))
            )

TemplateHandler(System.String)

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

Parameters

value - System.String

The value that configures the template.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Toolbar(t => t.Add().TemplateHandler("templateHandler"))
            )

Template(Kendo.Mvc.UI.TemplateBuilder)

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

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the template.

Text(System.String)

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

Parameters

value - System.String

The value that configures the text.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Toolbar(t => t.Add().Add()Text("text"))
            )

In this article
Not finding the help you need?