ControlsHelper.FillListControlWithEnum Method (ListControl, Type, String, Boolean, Boolean, List<String>) |
Fills the specified
ListControl with the items created from the specified enum type.
Namespace: CMS.ExtendedControlsAssembly: CMS.ExtendedControls (in CMS.ExtendedControls.dll) Version: 8.2.23
Syntaxpublic static void FillListControlWithEnum(
ListControl control,
Type enumType,
string resourcePrefix = null,
bool sort = false,
bool useStringRepresentation = false,
List<string> excludedValues = null
)
Parameters
- control
- Type: System.Web.UI.WebControls.ListControl
List control - enumType
- Type: System.Type
Enum type - resourcePrefix (Optional)
- Type: System.String
The resource prefix used for the item text localization.
Defaults to null.
- sort (Optional)
- Type: System.Boolean
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: System.Boolean
Indicates if string representation specified by the EnumStringRepresentationAttribute attribute will be used for the item value.
Defaults to false.
- excludedValues (Optional)
- Type: System.Collections.Generic.List<String>
Exclude values from enumeration
Remarks
See Also