Home > Articles > Programming > Windows Programming

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Field Value Edit Format

You might have noticed that the DateTime_Edit template uses the FieldValueEditString property of the FieldTemplateUserControl base class. This property is similar to the FieldValueString property discussed earlier in that it respects the FormattingOptions when converting the raw column value to a display string. However, it was specifically designed for use in the Edit mode templates, and an additional property is used to control its behavior.

  • ApplyFormatInEditMode is a Boolean value that determines whether the DataFormatString, NullDisplayText, ConvertEmptyStringToNull, and HtmlEncode display format properties will be used in Edit mode. This property is false by default.

Similar to using the FieldValueString property when implementing Read-only field templates, it is also important to rely on the FieldValueEditString property as much as possible when implementing the Edit and Insert mode templates. This helps the field templates to behave consistently and allow the application developers to change presentation aspects of column values using metadata attributes as well as explicit configuration in page markup.

  • + Share This
  • 🔖 Save To Your Account