The DecimalBox represents an input textbox which only allows a decimal
value to be entered. It presents its value in code directly as a nullable
decimal and has both client and server validation folded within itself.
The end result is that you can marry a DecimalBox directly to an object's
decimal typed property or even directly to a database field without having
to perform your own casting or validation.
Roadmap
Handle setting of Value to DBNull directly, internally casting to Decimal? null
Qualifiers
Type
Name
Default
Description
string
id
""
Unique identifier within the page for the control
string
Size
"thin"
Choice of Thin,Norm or Wide CSS sizes, corresponding to .C__Thin, .C__Norm and .C__Wide respectively
bool
Enabled
true
Wether or not the control is enabled within the page, directly mapped onto the HTML input disabled property.
bool
Visible
true
Wether or not the control is rendered into the output HTML stream.
bool
Mandatory
false
Wether or not the control is allowed to hold an empty (null) value.
decimal?
Value
(null)
The current value held by the control.
decimal?
Max
(null)
The maximum value the control allows, if null it is ignored, however if the user enters a value outside the range of the decimal type it will revert the value to null
decimal?
Min
(null)
The minimum value the control allows, if null it is ignored, see above regarding range.
int?
Digits
(null)
The number of digits to the left of the decimal place to pad with zeros, values are allowed to exceed this unless a matching max is also set. (-1 is interpreted as NULL)
int?
Places
(null)
Used to specify a fixed number of decimal places to the right of the decimal point, can be zero. Bankers rounding is used when truncating extra places. (-1 is interpreted as NULL)
bool
AutoLimit
true
If this is true and the value is outside the Min/Max values it will automatically bound it instead of invalidating the control.
bool
AutoZero
false
If the control is mandatory and the user enters a non-numeric value this setting will cause it to fall back to the Min value (if set) instead of invalidating the control.
bool
NoScript
false
Wether or not the control is allowed to generate any javascript whatsoever.