Ticket S31518
Visible to All Users

Formatting - Provide a single place to globally specify default DisplayFormat and EditMask for different data types

created 16 years ago

Refer to Default DisplayFormat to learn more on how to implement this task yourself.

Answers approved by DevExpress Support

created 12 years ago (modified 5 years ago)

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.

Additional information:

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.

Clipboard-File-2.png

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

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.