Back to Devexpress

DropDownButtonBuilder.SelectedItemKey(String) Method

aspnetcore-devextreme-dot-aspnet-dot-mvc-dot-builders-dot-dropdownbuttonbuilder-dot-selecteditemkey-x28-system-dot-string-x29.md

latest1.4 KB
Original Source

DropDownButtonBuilder.SelectedItemKey(String) Method

Contains the selected item's key and allows you to specify the initially selected item. Applies when useSelectMode is true. Mirrors the client-side selectedItemKey option.

Namespace : DevExtreme.AspNet.Mvc.Builders

Assembly : DevExtreme.AspNet.Core.dll

Declaration

csharp
public DropDownButtonBuilder SelectedItemKey(
    string value
)

Parameters

NameTypeDescription
valueString

The option value.

|

Returns

TypeDescription
DropDownButtonBuilder

A reference to this instance after the method is called.

|

Remarks

Use the following notation to set the option’s value:

cshtml
@(Html.DevExtreme().DropDownButton()
    .SelectedItemKey("MyKey")
)

See Also

DropDownButtonBuilder Class

DropDownButtonBuilder Members

DevExtreme.AspNet.Mvc.Builders Namespace