Skip to main content

GanttToolbarItemBuilder.MenuItemTemplate(RazorBlock) Method

Specifies a template that should be used to render a menu item. Mirrors the client-side menuItemTemplate option.

Namespace: DevExtreme.AspNet.Mvc.Builders

Assembly: DevExtreme.AspNet.Core.dll

Declaration

public GanttToolbarItemBuilder MenuItemTemplate(
    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().MenuItemTemplate(@<text>
            Template content
        </text>);
        })
    )
)
See Also