JS

TemplateName Struct

An external template's name.

Namespace: DevExtreme.AspNet.Mvc

Assembly: DevExtreme.AspNet.Core.dll

Declaration

public struct TemplateName

Remarks

This struct is used in *Template(TemplateName) methods to specify an external template's name. Refer to External Templates for more information.

The following example demonstrates how to apply an external template to a box item.

@(Html.DevExtreme().Box()
    .ItemTemplate(new TemplateName("myBox_itemTemplate"))
)

@using(Html.DevExtreme().NamedTemplate("myBox_itemTemplate")) {
    <div>
        Template content
    </div>
}
See Also