DropDownButtonBuilder.DropDownContentTemplate(TemplateName) Method

Specifies the client-side dropDownContentTemplate.

Namespace: DevExtreme.AspNet.Mvc.Builders

Assembly: DevExtreme.AspNet.Core.dll

Declaration

public DropDownButtonBuilder DropDownContentTemplate(
    TemplateName name
)

Parameters

Name Type Description
name TemplateName

A template name.

Returns

Type Description
DropDownButtonBuilder

A reference to this instance after the method is called.

Remarks

This method applies an external template to a drop-down content. Refer to External Templates for more information and code examples.

@(Html.DevExtreme().DropDownButton()
    .DropDownContentTemplate(new TemplateName("myDropDownButton_dropDownContentTemplate"))
)

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