IntegerEditorAttribute class
namespace: Serenity.ComponentModel assembly: Serenity.Net.Core
Indicates that the target property should use a "Integer" editor.
[AttributeUsage(AttributeTargets.All)]
public class IntegerEditorAttribute : CustomEditorAttribute
Public Members
| name | description |
|---|---|
| IntegerEditorAttribute() | Initializes a new instance of the IntegerEditorAttribute class. |
| AllowNegatives { get; set; } | Gets or sets a value indicating whether the editor should allow negatives. |
| MaxValue { get; set; } | Gets or sets the maximum value. |
| MinValue { get; set; } | Gets or sets the minimum value. |
| static AllowNegativesByDefault { get; set; } | Gets or sets a value indicating whether editors should allow negatives by default. This is a global setting that controls the default of the AllowNegatives property in this attribute. 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: IntegerEditorAttribute.cs