Hide

YetaWF Documentation

Display
Print

Decimal Component

Decimal (Display)

Displays the model formatted as a decimal number with 2 fractional digits. If the model is null, nothing is rendered.

Model Type: decimal?

[Category("General"), Caption("Sales Tax - Rate"), Description("The sales tax rate (in percent) collected on purchases")]
[UIHint("Decimal"), ReadOnly]
public decimal SalesTaxRate { get; set; }

Decimal (Edit)

Allows entry of a decimal number with 2 fractional digits.

Model Type: decimal?

The RangeAttribute can be used to define the lowest and highest allowable values.

AdditionalMetadata Attributes

NameTypeDefaultDescription
Stepdouble1.0The increment/decrement used when clicking on the up/down arrows of the edit control.
PlainboolfalseDefines whether the number is shown using the defined locale.

Sibling Properties

NameTypeDescription
model__PlaceHolderstringDefines the placeholder text shown when control contents are empty.
[Category("General"), Caption("Sales Tax - Rate"), Description("The sales tax rate (in percent) collected on purchases")]
[UIHint("Decimal"), Range(0.0, 100.0), Required]
public decimal SalesTaxRate { get; set; }