Tab
A newer version of this page is available. Switch to the current version.

ASPxDateEdit.EditFormatString Property

Gets or sets the pattern used to format the editor's edited value displayed within the edit box, when the ASPxDateEdit.EditFormat propety is set to EditFormat.Custom.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

[DefaultValue("")]
public string EditFormatString { get; set; }
<DefaultValue("")>
Public Property EditFormatString As String

Property Value

Type Default Description
String

String.Empty

A string representing the format pattern.

Remarks

This property is a wrapper of the DateEditProperties.EditFormatString property.

Examples

This example demonstrates how the edited value can be formatted within the ASPxDateEdit control.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="DevExpress.Web.v8.3, Version=8.3.2.0, Culture=neutral, 
PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
</script>

 <html xmlns="http://www.w3.org/1999/xhtml" >
 <head id="Head1" runat="server">
     <title>Edited Value Formatting</title>
 </head>
 <body>
     <form id="form1" runat="server">
     <div>
         <br/>
         <table border="0" cellpadding="0" cellspacing="20"><tr>
             <td>EditFormat=Date</td>
             <td>EditFormat=DateTime</td>
             <td>EditFormat=Custom, EditFormatString=f</td>
         </tr><tr>
             <td>
                 <dxe:ASPxDateEdit ID="ASPxDateEdit1" runat="server" Date="09/04/2007 17:37:25">
                 </dxe:ASPxDateEdit>
             </td>
             <td>
                 <dxe:ASPxDateEdit ID="ASPxDateEdit2" runat="server" EditFormat="DateTime" 
                  Date="09/04/2007 17:37:29">
                 </dxe:ASPxDateEdit>
             </td>
             <td>
                 <dxe:ASPxDateEdit ID="ASPxDateEdit3" runat="server" EditFormat="Custom" 
                  EditFormatString="f" Date="09/04/2007 17:37:33">
                 </dxe:ASPxDateEdit>
             </td>
         </tr></table>
     </div>
     </form>
 </body>
 </html>
See Also