Number Field

From Sense/Net Wiki
Jump to: navigation, search
  • 100%
  • 6.0
  • Enterprise
  • Community
  • Planned


Number Field is used for storing any kind of number data.


In a Number Field any kind of data can be stored that can be translated as a number, such as: byte, integer, double, decimal, unsigned integer.

Field handler

  • handler: SenseNet.ContentRepository.Fields.NumberField
  • short name: Number

Usage in CTD:

   <Field name="Data1" type="Number">

Supported Field Controls


The following properties can be set in the field's configuration:

  • MinValue: (optional) defines the allowed minimum value of the input data.
  • MaxValue: (optional) defines the allowed maximum value of the input data.
  • Digits: (optional) specifies the number of the displayed decimals. Default value is 2.
  • ShowAsPercentage: (optional) number is stored as decimal value and displayed as percentage.


Fully featured example:

<Field name="Data1" type="Number">
      <Description>This field contains the price of the car</Description>

The above example configures the Number field so that:

  • the field is editable (not read-only)
  • filling the field is compulsory.
  • the minimal value has to be at least 1
  • the maximal value can be set up to 99.5 (remark that the Min and MaxValue can be defined by decimal number)
  • the data is displayed with 4 decimal numbers

Related links