Export (0) Print
Expand All

DynamicField.ApplyFormatInEditMode Property

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

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

'Declaration
Public Property ApplyFormatInEditMode As Boolean

Property Value

Type: System.Boolean
true if the DynamicField applies formatting in edit mode; otherwise, false. The default is false.

Implements

IFieldFormattingOptions.ApplyFormatInEditMode

Data-bound controls (such as DetailsView, and GridView) have different display modes that allow the user to read, edit, or insert records. By default, the formatting string specified by the DataFormatString property is applied to field values only when the data-bound 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

A DynamicField object 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.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft