Back to Devexpress

DropDownButtonBuilder.DropDownContentTemplate(JS) Method

aspnetcore-devextreme-dot-aspnet-dot-mvc-dot-builders-dot-dropdownbuttonbuilder-dot-dropdowncontenttemplate-x28-devextreme-dot-aspnet-dot-mvc-dot-js-x29.md

latest1.9 KB
Original Source

DropDownButtonBuilder.DropDownContentTemplate(JS) Method

Specifies the client-side dropDownContentTemplate.

Namespace : DevExtreme.AspNet.Mvc.Builders

Assembly : DevExtreme.AspNet.Core.dll

Declaration

csharp
public DropDownButtonBuilder DropDownContentTemplate(
    JS value
)

Parameters

NameTypeDescription
valueJS

A JavaScript function that specifies the template.

|

Returns

TypeDescription
DropDownButtonBuilder

A reference to this instance after the method is called.

|

Remarks

This method allows you to define a drop-down content template using a JavaScript function. You can access dropDownContentTemplate‘s parameters from this function. Refer to JavaScript Functions as Templates for more information.

cshtml
@(Html.DevExtreme().DropDownButton()
    .DropDownContentTemplate(new JS("myDropDownButton_dropDownContentTemplate"))
)

<script>
    function myDropDownButton_dropDownContentTemplate() {
        // Template rendering logic
    }
</script>

See Also

DropDownButtonBuilder Class

DropDownButtonBuilder Members

DevExtreme.AspNet.Mvc.Builders Namespace