Skip to main content
Tab

DateEditProperties.DisplayFormatString Property

Gets or sets the pattern used to format the editor’s value for display purposes.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue("d")]
public override string DisplayFormatString { get; set; }

Property Value

Type Default Description
String "d"

A string representing the format pattern.

Remarks

This property overrides the base EditPropertiesBase.DisplayFormatString property to provide a specific default value.

Note

Display values can be formatted using the standard formatting mechanism. It allows you to format values using standard format patterns. Format specifiers for composing the format pattern are described in the Numeric Format Strings and Date and Time Format Strings topics.

If an editor is used for inplace editing within a complex data control (such as the ASPxGridView or ASPxTreeList), the TextEditProperties.DisplayFormatInEditMode property can be additionally used to apply the format provided by the DisplayFormatString property to the editor value in the data control’s edit mode.

Example

<dx:ASPxGridView ID="ASPxGridView1" runat="server" Width="100%" KeyFieldName="OrderID"
  DataSourceID="OrdersDataSource" >
    <Columns>
        <dx:GridViewDataTextColumn FieldName="OrderID" VisibleIndex="0" ReadOnly="True">
            <EditFormSettings Visible="False" />
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataDateColumn FieldName="OrderDate" VisibleIndex="1">
            <PropertiesDateEdit DisplayFormatString="ddd dd/MM/yyyy" Height="30" />
        </dx:GridViewDataDateColumn>
        <dx:GridViewDataTextColumn FieldName="ShipName" VisibleIndex="2">
        </dx:GridViewDataTextColumn>
    </Columns>
    <SettingsPager Mode="ShowPager" PageSize="4" />
</dx:ASPxGridView>

GridView - DisplayFormatString Property

See Also