DxGridDataColumn.DisplayFormat Property
Specifies the format string for column values.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v21.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public string DisplayFormat { get; set; }
Property Value
Type | Description |
---|---|
String | The format string. |
Remarks
Use the DisplayFormat
property to format values displayed in column cells. For information about supported format strings, refer to the following topic: Format types in .NET.
The code snippet below applies the following formats:
- The short date format to the OrderDate field.
- The numeric format to the Freight field.
- The currency format to the ExtendedPrice field.
<DxGrid Data="GridDataSource">
<Columns>
<DxGridDataColumn FieldName="OrderDate" DisplayFormat="d" />
<DxGridDataColumn FieldName="CustomerName" />
<DxGridDataColumn FieldName="Country" />
<DxGridDataColumn FieldName="Freight" DisplayFormat="n2" />
<DxGridDataColumn FieldName="ExtendedPrice" DisplayFormat="c" />
</Columns>
</DxGrid>
Implements
See Also