EnumEditorAttribute class
namespace: Serenity.ComponentModel assembly: Serenity.Net.Core
Indicates that the target property should use a "Enum" editor.
[AttributeUsage(AttributeTargets.All)]
public class EnumEditorAttribute : CustomEditorAttribute
Public Members
| name | description |
|---|---|
| EnumEditorAttribute() | Initializes a new instance of the EnumEditorAttribute class. |
| EnumEditorAttribute(…) | Initializes a new instance of the EnumEditorAttribute class for a numeric enum or a StringEnum type, which is needed for a property that is not typed with it, e.g. a string property that holds the values of a StringEnum. (2 constructors) |
| AllowClear { get; set; } | Gets or sets a value indicating whether to allow clearing. |
| Delimited { get; set; } | Use comma separated string instead of an array to serialize values. |
| EnumKey { get; set; } | Gets or sets the key of the enum or string enumeration, which is determined from the type of the property when it is typed with one. |
| Flags { get; set; } | Indicates whether the enum should be treated as a flags enum, allowing multiple selections. |
| MinimumResultsForSearch { get; set; } | The minimum number of results that must be initially (after opening the dropdown for the first time) populated in order to keep the search field. This is useful for cases where local data is used with just a few results, in which case the search box is not very useful and wastes screen space. The option can be set to a negative value to permanently hide the search field. |
| Multiple { get; set; } | Allow multiple selection. Make sure your field is a List. You may also set CommaSeparated to use a string field. |
| const Key | Editor type key |
See Also
- class CustomEditorAttribute
- Source: EnumEditorAttribute.cs