Back to Devexpress

DxDropDownBoxDropDownButton Class

blazor-devexpress-dot-blazor-cd22b339.md

latest2.9 KB
Original Source

DxDropDownBoxDropDownButton Class

A button that invokes the drop-down window in the DxDropDownBox component.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public class DxDropDownBoxDropDownButton :
    DxEditorDropDownButtonBase

Remarks

The DxDropDownBox component has a built-in button that invokes the drop-down window. Set the ShowDropDownButton property to false to hide this button.

You can add a custom drop-down button to the editor as follows:

  1. Add a DxDropDownBoxDropDownButton object to the Buttons collection.
  2. Customize button properties.
razor
<label for="ddbMultipleSelectionListBox" class="cw-480 mb-1">Employees</label>
<DxDropDownBox @bind-Value="Value"
                QueryDisplayText="QueryText"
                InputId="ddbMultipleSelectionListBox"
                CssClass="cw-480"
                ShowDropDownButton="false"
                ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto">
    <Buttons>
        <DxDropDownBoxDropDownButton Position="EditorButtonPosition.Left" />
        <DxEditorButton Text="Default" Click="SetDefaultValue" />
    </Buttons>
    <DropDownBodyTemplate>
        <DxListBox ... />
    </DropDownBodyTemplate>
</DxDropDownBox>

@code {
    object Value { get; set; }

    // ...
    void SetDefaultValue(MouseEventArgs args) {
        // Value = ...
    }
}

For additional information about command buttons in editors, refer to the following topic: Command Buttons.

Implements

IComponent

IHandleAfterRender

IHandleEvent

IDisposable

Inheritance

Object ComponentBase DevExpress.Blazor.Internal.RenderComponentBase DevExpress.Blazor.Internal.Editors.DxEditorButtonBase DxEditorDropDownButtonBase DxDropDownBoxDropDownButton

See Also

DxDropDownBoxDropDownButton Members

DevExpress.Blazor Namespace