Skip to main content

Select Box

  • 2 minutes to read

SelectBox is a UI component that allows users to select a value from a drop-down list or add a new value.

Run Demo: SelectBox Read Tutorial

Getting Started

The SelectBox UI Control is based on the DevExtreme SelectBox component.

The following help topics explain how to add this control to your project:

Basic Syntax

@(Html.DevExtreme().SelectBox()
    .Items(new [] {"Item 1", "Item 2", "Item 3"})
)

Built-in Capabilities and Configuration Guides

  • Input-Based Search
    Configure search settings to search within SelectBox items.

  • Selection
    Users can select items from a drop-down list. You can handle the selection.

  • Data Binding to Various Sources
    Bind DevExtreme SelectBox to different sources like local arrays, JSON, OData, Web API, MongoDB, and custom sources.

  • Custom Value Entry
    Allow users to add new items to SelectBox in addition to selecting from the existing items.

  • Display Groups
    Group SelectBox items for better readability. Modify appearance of group items with groupTemplate.

API

Server-Side API

Initialization
Call the SelectBox() method to create a SelectBox control. This action initializes a SelectBoxBuilder instance. Use the instance methods to specify SelectBox options and event handlers.
Options
For a complete option list, see SelectBoxBuilder Members. For details on how to specify control options, refer to the following help topic: Specify Options.
Events
For available events, see Events. For details on how to handle events, refer to the following help topic: Handle Events and Define Callbacks.

Client-Side API

Options
If you need to specify the SelectBox options dynamically on the client side, use client-side API. For a complete option list, see DevExtreme SelectBox options.
Methods
For a list of available methods, see DevExtreme SelectBox methods. For details on how to call methods, refer to the following help topic: Call Methods.

Accessibility

For more information on SelectBox accessibility compliance, refer to the following help topic: Accessibility.

Demos

Run Demo: SelectBox