Refer to Default DisplayFormat to learn more on how to implement this task yourself.
Formatting - Provide a single place to globally specify default DisplayFormat and EditMask for different data types
Answers approved by DevExpress Support
We have implemented the functionality described in this ticket. It will be included in our next update(s).
Please check back and leave a comment to this response to let us know whether or not this solution addresses your concerns.
Starting with version 13.1, you will have a single place for setting the DisplayFormat and EditMask properties for a type, because the IModelRegisteredPropertyEditor interface has been extended with respective properties. This improvement is mainly supposed to reduce the duplicate work when providing default formatting for common types like System.DateTime, Decimal, Integer, Double, etc.
As expected, these defaults will be automatically propagated to class members, ListView columns and DetailView editors, with the capability to provide custom values at these levels.
Take special note that a custom PropertyEditor class will use the default formatting from the application model or from the DevExpress.ExpressApp.Editors.FormattingProvider singleton (if the model is unavailable) only if it overrides the CanFormatPropertyValue property and returns true there (by default PropertyEditor.CanFormatPropertyValue returns false). Otherwise, its DisplayFormat and EditMask properties will be empty.
Built-in columns List Editors like GridListEditor and TreeListEditor will also consider PropertyEditor's formatting options in the first place and override the default column settings got from the application model.
Thanks,
Dennis
- v13.1.4Download Official Update