Skip to main content
A newer version of this page is available. .
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.v19.1.dll

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" AutoGenerateColumns="False"  
  DataSourceID="SqlDataSource1" Width="40%" Theme="Office365" KeyFieldName="OrderID">
    <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>

See Also