DxListEditorColumn.Caption Property
Specifies the column’s caption text.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue(null)]
[Parameter]
public string Caption { get; set; }
Property Value
Type | Default | Description |
---|---|---|
String | null | The column header. |
Remarks
If you bind a column to a data field, the editor generates user-friendly caption based on the field name. To specify a custom header text, use the Caption
property.
The following code snippet adds three columns to a List Box and applies custom captions to the FirstName
and LastName
columns.
@using StaffData
<DxListBox Data="@Staff.DataSource"
@bind-Values="@Values">
<Columns>
<DxListEditorColumn FieldName="Id" Width="50px" />
<DxListEditorColumn FieldName="FirstName" Caption="Name"/>
<DxListEditorColumn FieldName="LastName" Caption="Surname"/>
</Columns>
</DxListBox>
@code {
IEnumerable<Person> Values { get; set; } = Staff.DataSource.Take(1);
}
Implements
See Also