blazor-devexpress-dot-blazor-dot-dxdropdownbox-5f38543d.md
Specifies a unique identifier (ID) of the editor’s input element.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(null)]
[Parameter]
public string InputId { get; set; }
| Type | Default | Description |
|---|---|---|
| String | null |
A unique identifier.
|
The InputId property value is assigned to the id attribute of the DropDownBox’s input element. The id is case-sensitive, should contain at least one character, and should not contain whitespaces (spaces, tabs, etc.)
When you create a Form Layout component and add the DropDownBox to a layout item’s template, use the InputId property to associate the the DropDownBox with the layout item’s caption.
InputId property to the same value as the item’s CaptionFor.Note
If you do not specify the CaptionFor property, the Form Layout generates a random identifier (Guid ) and assigns it to the label’s for attribute and to the id property of the first input element in the template.
Run Demo: DropDown Box - Multiple Selection ListBox
<DxFormLayout>
<DxFormLayoutItem Caption="Contact Name:" CaptionFor="dd_box">
<Template>
<DxDropDownBox InputId="dd_box" @bind-Value="Value" QueryDisplayText="QueryText">
<DropDownBodyTemplate Context="ddb_context">
<DxListBox... />
</DropDownBodyTemplate>
</DxDropDownBox>
</Template>
</DxFormLayoutItem>
@*...*@
</DxFormLayout>
You can click the associated label to focus the DropDownBox editor.
See Also