Back to Devexpress

DateEditProperties.DisplayFormatString Property

aspnet-devexpress-dot-web-dot-dateeditproperties.md

latest3.1 KB
Original Source

DateEditProperties.DisplayFormatString Property

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

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue("d")]
public override string DisplayFormatString { get; set; }
vb
<DefaultValue("d")>
Public Overrides Property DisplayFormatString As String

Property Value

TypeDefaultDescription
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

aspx
<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>

See Also

DisplayFormatInEditMode

Date Editor

DateEditProperties Class

DateEditProperties Members

DevExpress.Web Namespace