Assembly: System.Web (in System.Web.dll)
Data-bound controls (such as DetailsView, FormView, 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 property to true.
A BoundField 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.
The following code example demonstrates how to use the property to apply the formatting string to field values while a GridView control is in edit mode. The formatting is then programmatically removed before the value is updated in the data source.