Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Collapse]eXpressApp Framework
 [Expand]Fundamentals
 [Expand]Getting Started
 [Collapse]Concepts
  [Expand]Application Solution Components
  [Collapse]Business Model Design
    Business Model Design Basics
    Built-in Business Classes for Most Popular Scenarios
   [Expand]Business Model Design with Entity Framework
   [Expand]Business Model Design with XPO
    Non-Persistent Objects
    PropertyChanged Event in Business Classes
   [Collapse]Data Types Supported by built-in Editors
     Key Properties
    [Expand]String Properties
    [Collapse]Numeric Properties
      Numeric Properties in XPO
      Numeric Properties in Entity Framework
      Numeric Properties in Domain Components
    [Expand]Date and Time Properties
    [Expand]Boolean Properties
    [Expand]BLOB Image Properties
    [Expand]Collection Properties
    [Expand]Reference (Foreign Key, Complex Type) Properties
    [Expand]File Attachment Properties
    [Expand]Type Properties
    [Expand]Enumeration Properties
    [Expand]Criteria Properties
    [Expand]Color Properties
     Geolocation Properties
     Miscellaneous Property Types
    Mapping Complex Types to the Database
   [Expand]Types Info Subsystem
    Connect an XAF Application to a Database Provider
    Data Annotations in Data Model
    Create and Update the Application's Database
  [Expand]Application Model
  [Expand]UI Construction
  [Expand]Extend Functionality
  [Expand]Data Manipulation and Business Logic
  [Expand]Security System
  [Expand]Localization
  [Expand]System Module
  [Expand]Extra Modules
  [Expand]Debugging and Error Handling
  [Expand]Filtering
  [Expand]Application Life Cycle
 [Expand]Design-Time Features
 [Expand]Functional Testing
 [Expand]Deployment
 [Expand]Task-Based Help
 [Expand]Frequently Asked Questions
 [Expand]API Reference
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
[Expand]End-User Documentation

Numeric Properties

Depending on the type of a numeric property (long, int, decimal, etc., including the same Nullable types), different formatting is used in a UI.

Windows Forms

ASP.NET

Note

To see Numeric Property Editors in action, refer to the Property Editors | Numeric Properties section in the Feature Center demo installed with XAF. By default, the Feature Center demo is installed in %PUBLIC%\Documents\DevExpress Demos 17.1\Components\eXpressApp Framework\FeatureCenter. The ASP.NET version of this demo is available online at http://demos.devexpress.com/XAF/FeatureCenter/.

Expanded Examples

Expanded Windows Forms Property Editors for Numeric Properties

Each WinForms Property Editor has a control that displays a corresponding property in a Detail View, and a repository item that displays a property in a List Editor that supports in-place editing. The table below shows both the control and repository item.

Property Editor Type and Description Control Repository Item

BytePropertyEditor

Used for byte type properties by default.
Represents the IntegerPropertyEditor class descendant. If the repository item's MaxValue property is set to 0 or a value that is greater than the Byte.MaxValue value, it is set to the Byte.MaxValue value. If the repository item's MinValue property is set to 0 or a value that is less than the Byte.MinValue value, it is set to the Byte.MinValue value.
IntegerEdit - a descendant of the SpinEdit editor from the XtraEditors Library RepositoryItemIntegerEdit - a descendant of the RepositoryItemSpinEdit repository item from the XtraEditors Library

DecimalPropertyEditor

Used for decimal type properties by default.
The RepositoryItemSingleEdit class is inherited to store and display values using the "C" Numeric edit mask, when the Property Editor's EditMask is not specified.
DecimalEdit - a descendant of the SingleEdit editor used by the FloatPropertyEditor RepositoryItemDecimalEdit - a descendant of the RepositoryItemSingleEdit repository item used by the FloatPropertyEditor

DoublePropertyEditor

Used for double type properties by default.
DoubleEdit - a descendant of the SingleEdit editor used by the FloatPropertyEditor RepositoryItemDoubleEdit - a descendant of the RepositoryItemSingleEdit repository item used by the FloatPropertyEditor

FloatPropertyEditor

Used for float type properties by default.
The RepositoryItemIntegerEdit class is inherited to allow the display of float values.
SingleEdit - a descendant of the IntegerEdit editor used by the IntegerPropertyEditor RepositoryItemSingleEdit - a descendant of the RepositoryItemIntegerEdit repository item used by the IntegerPropertyEditor

IntegerPropertyEditor

Used for Int32 type properties by default.
IntegerPropertyEditor has the EditMask property. By default, this property is set to the value of the Views | <DetailView> | Items | <PropertyEditor> node's IModelCommonMemberViewItem.EditMask property. When assigning a value to this property (or the EditMask attribute directly in code), use the syntax of the Numeric mask type. In this instance, the specified mask will be applied to the property value displayed by the Property Editor. For details on masks, refer to the Mask Editors Overview | Mask Types topic.
IntegerEdit - a descendant of the SpinEdit editor from the XtraEditors Library RepositoryItemIntegerEdit - a descendant of the RepositoryItemSpinEdit repository item from the XtraEditors Library

LongPropertyEditor

Used for Int64 type properties by default.
Represents the IntegerPropertyEditor class descendant. If the repository item's MaxValue property is set to 0 or a value that is greater than the Long.MaxValue value, it is set to the Long.MaxValue value. If the repository item's MinValue property is set to 0 or a value that is less than the Long.MinValue value, it is set to the Long.MinValue value.
IntegerEdit - a descendant of the SpinEdit editor from the XtraEditors Library RepositoryItemIntegerEdit - a descendant of the RepositoryItemSpinEdit repository item from the XtraEditors Library

Expanded ASP.NET Property Editors for Numeric Properties

Each ASP.NET Property Editor has controls that display a property in a Detail View's View mode and in an Edit mode (see DetailView.ViewEditMode). These controls are listed in the table below.

Property Editor Type and Description

Control Used in View Mode

Control Used in Edit Mode

ASPxBytePropertyEditor

Used for byte type properties by default.
System.Web.UI.WebControls.Label ASPxSpinEdit editor from the ASPxEditors Library

ASPxDecimalPropertyEditor

Used for decimal type properties by default.
Inherited from the ASPxIntPropertyEditor class.
Uses the "C" edit mask and display format. This Property Editor also enables float value input.
System.Web.UI.WebControls.Label ASPxSpinEdit editor from the ASPxEditors Library

ASPxDoublePropertyEditor

Used for double type properties by default.
Inherited from the ASPxFloatPropertyEditor class. Casts the editor's value to the double type.
System.Web.UI.WebControls.Label ASPxSpinEdit editor from the ASPxEditors Library

ASPxFloatPropertyEditor

Used for single type properties by default.
Inherited from the ASPxIntPropertyEditor class.
Uses the "F" edit mask and display format by default. In addition, this Property Editor enables float value input.
System.Web.UI.WebControls.Label ASPxSpinEdit editor from the ASPxEditors Library

ASPxIntPropertyEditor

Used for Int32 type properties by default.
System.Web.UI.WebControls.Label ASPxSpinEdit editor from the ASPxEditors Library

ASPxInt64PropertyEditor

Used for Int64 type properties by default.
Inherited from the ASPxIntPropertyEditor class. Casts the editor's value to the Int64 type.
System.Web.UI.WebControls.Label ASPxSpinEdit editor from the ASPxEditors Library

How would you rate this topic?​​​​​​​