Hide

YetaWF Documentation

Display
Print

Currency Component

Currency (Display)

Displays a currency amount based on the provided model, formatted using the site's defined default currency. If the model is null, nothing is rendered.

Model Type: decimal?

The currency is based on the site's defined default currency. The default currency can be found at Admin > Settings > Site Settings, Site tab, Currency, Currency Format and Currency Rounding fields.

[Caption("Hourly Rate"), Description("Shows the hourly rate")]
[UIHint("Currency"), ReadOnly]
public decimal DefaultHourlyRate { get; set; }

Currency (Edit)

Allows entry of a currency amount, formatted using the site's defined default currency.

Model Type: decimal?

The currency is based on the site's defined default currency. The default currency can be found at Admin > Settings > Site Settings, Site tab, Currency, Currency Format and Currency Rounding fields.

The RangeAttribute attribute can be used to set upper and/or lower amount limits.

AdditionalMetadata Attributes

NameTypeDefaultDescription
ReadOnlyboolfalseDefines whether the control is rendered read/only.
DisabledboolfalseDefines whether the control is disabled.
PlainboolfalseDefines whether the number is shown using the defined locale.

Sibling Properties

NameTypeDescription
model__PlaceHolderstringDefines the placeholder text shown when control contents are empty.
[Caption("Hourly Rate"), Description("Enter the hourly rate")]
[UIHint("Currency"), Range(0.0, 999999.0), Required]
public decimal DefaultHourlyRate { get; set; }