DecimalEditorAttribute class
namespace: Serenity.ComponentModel assembly: Serenity.Net.Core
Indicates that the target property should use a "Decimal" editor.
[AttributeUsage(AttributeTargets.All)]
public class DecimalEditorAttribute : CustomEditorAttribute
Public Members
| name | description |
|---|---|
| DecimalEditorAttribute() | Initializes a new instance of the DecimalEditorAttribute class. |
| AllowNegatives { get; set; } | Gets or sets a value indicating whether to allow negatives. |
| Decimals { get; set; } | Gets or sets the number of decimals allowed. |
| MaxValue { get; set; } | Gets or sets the maximum value. |
| MinValue { get; set; } | Gets or sets the minimum value. |
| PadDecimals { get; set; } | Gets or sets a value indicating whether to pad decimals with zero. |
| static AllowNegativesByDefault { get; set; } | Gets or sets a value indicating whether to allow negatives by default. This is a global setting that controls if decimal editors should allow negative values unless specified otherwise. Returns the local value if any is set through SetLocalAllowNegativesByDefault, otherwise the default value. The local value should be used for unit tests. |
| const Key | Editor type key |
| static SetLocalAllowNegativesByDefault(…) | Sets the local value for AllowNegativesByDefault for the current thread and async context. Useful for background tasks, async methods, and testing to set the value locally without affecting other threads or tests. |
See Also
- class CustomEditorAttribute
- Source: DecimalEditorAttribute.cs