Skip to main content
A newer version of this page is available. .

GanttToolbarItemBuilder.Template(RazorBlock) Method

Mirrors the client-side template option.

Namespace: DevExtreme.AspNet.Mvc.Builders

Assembly: DevExtreme.AspNet.Core.dll

Declaration

public GanttToolbarItemBuilder Template(
    RazorBlock templateContent
)

Parameters

Name Type Description
templateContent RazorBlock

The Razor @<text> block that contains JavaScript function code.

Returns

Type Description
GanttToolbarItemBuilder

A reference to this instance after the method is called.

Remarks

This method allows you to specify an item template with the Razor @<text> block. Refer to the Templates article for more information and code examples.

@(Html.DevExtreme().Gantt()
    .Toolbar(toolbar => toolbar
        .Items(items => {
            items.Add().Template(@<text>
            Template content
        </text>);
        })
    )
)
See Also