blazor-devexpress-dot-blazor-dot-dxformlayoutitem-2f290d60.md
Specifies a unique identifier of the layout item’s caption and allows you to associate the caption with a component in the template.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(null)]
[Parameter]
public string CaptionFor { get; set; }
| Type | Default | Description |
|---|---|---|
| String | null |
A unique identifier.
|
Use the CaptionFor property to associate a layout item’s caption with a component in the layout item’s template.
CaptionFor property to a unique value. This value is assigned to the label’s for attribute. Note that this value is case-sensitive, should contain at least one character, and should not contain whitespaces (spases, tabs, etc.)CaptionFor.You can click the associated label to focus/activate the input element.
Note
If you do not specify the CaptionFor property, the Form Layout generates a random identifier (Guid ) and assings it to the label’s for attribute and to the id property of the first component in the template.
See Also