ControlsHelperFillListControlWithEnumTEnum Method (ListControl, String, Boolean, Boolean, ListString) |
Fills the specified
ListControl with the items created from the specified enum type.
Namespace: CMS.ExtendedControlsAssembly: CMS.ExtendedControls (in CMS.ExtendedControls.dll) Version: 9.0.0
Syntax public static void FillListControlWithEnum<TEnum>(
ListControl control,
string resourcePrefix = null,
bool sort = false,
bool useStringRepresentation = false,
List<string> excludedValues = null
)
Parameters
- control
- Type: System.Web.UI.WebControlsListControl
List control - resourcePrefix (Optional)
- Type: SystemString
The resource prefix used for the item text localization.
Defaults to null.
- sort (Optional)
- Type: SystemBoolean
Indicates whether the items should be sorted.
If true, the items are sorted by the item text after localization, otherwise the order of items corresponds to the enum declaration.
Defaults to false.
- useStringRepresentation (Optional)
- Type: SystemBoolean
Indicates if string representation specified by the EnumStringRepresentationAttribute attribute will be used.
Defaults to false.
- excludedValues (Optional)
- Type: System.Collections.GenericListString
Exclude values from enumeration
Type Parameters
- TEnum
Remarks See Also