Export (0) Print
Expand All

DynamicControl.ApplyFormatInEditMode Property

Gets or sets a value that indicates whether the formatting string specified by the DataFormatString property is applied to field values when the field is in edit mode.

Namespace:  System.Web.DynamicData
Assembly:  System.Web.DynamicData (in System.Web.DynamicData.dll)

public bool ApplyFormatInEditMode { get; set; }
<asp:DynamicControl ApplyFormatInEditMode="True|False" />

Property Value

Type: System.Boolean
true if the formatting string is applied; otherwise, false. The default is false.

Implements

IFieldFormattingOptions.ApplyFormatInEditMode

The DynamicControl control has different display modes that allow the user to read, edit, or insert a field. By default, the formatting string specified by the DataFormatString property is applied to a field value only when the DynamicControl control is in read-only mode. To apply the formatting string to values displayed while the data-bound control is in edit mode, set the ApplyFormatInEditMode property to true.

NoteNote:

The DynamicControl control does not automatically remove the formatting when the field is updated in the data source. If you do not want the formatting as part of the value stored, you will need to remove the formatting programmatically.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5 SP1

Community Additions

ADD
Show:
© 2014 Microsoft