DxButtonEditSettings.DisplayFormat Property
Specifies the pattern used to format unfocused editor values.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue(null)]
[Parameter]
public string DisplayFormat { get; set; }
Property Value
Type | Default | Description |
---|---|---|
String | null | The format pattern. |
Remarks
You can specify a display format at column and editor levels:
- A column’s DisplayFormat property formats column cell values when the Grid is in display mode.
- An editor’s
DisplayFormat
property the value of the editor when it is unfocused and the Grid is in edit mode.
When one of these properties is unspecified, the specified property defines both formats.
Refer to the following topics for more information about supported format strings:
The following example applies the long date format in display mode and the short date format in edit mode:
<DxGrid Data="@employees" PageSize="6" EditMode="GridEditMode.EditRow">
<Columns>
<DxGridCommandColumn />
<DxGridDataColumn FieldName="FirstName" />
<DxGridDataColumn FieldName="LastName" />
<DxGridDataColumn FieldName="HireDate" >
<EditSettings>
<DxDateEditSettings DisplayFormat="D" Format="d" />
</EditSettings>
</DxGridDataColumn>
<DxGridDataColumn FieldName="Email" />
</Columns></DxGrid>
@code {
Employee[]? employees;
protected override async Task OnInitializedAsync() {
employees = await EmployeeData.GetData();
}
}
To change how unfocused editor values are formatted at runtime, use the IButtonEditSettings.DisplayFormat property.
Implements
See Also