C# Class Candor.Web.Mvc.EnhancedSelectListItem

An enhancement of a basic SelectListItem that adds other supported html attributes and extensions for the data specification.
Inheritance: System.Web.Mvc.SelectListItem
Show file Open project: michael-lang/candor-common

Public Methods

Method Description
ListFromBoolean ( bool selectedValue ) : List

Gets a set of select list items for a boolean type.

ListFromEnum ( Type enumType ) : List

Creates a list of enhanced select list items for all values in a specific enum type.

ListFromEnum ( Type enumType, List selectedValues ) : List

Creates a list of enhanced select list items for all values in a specific enum type.

ListFromEnum ( Type enumType, string selectedValues ) : List

Creates a list of enhanced select list items for all values in a specific enum type.

Method Details

ListFromBoolean() public static method

Gets a set of select list items for a boolean type.
public static ListFromBoolean ( bool selectedValue ) : List
selectedValue bool The boolean value to be selected.
return List

ListFromEnum() public static method

Creates a list of enhanced select list items for all values in a specific enum type.
public static ListFromEnum ( Type enumType ) : List
enumType System.Type The type of the enumeration.
return List

ListFromEnum() public static method

Creates a list of enhanced select list items for all values in a specific enum type.
public static ListFromEnum ( Type enumType, List selectedValues ) : List
enumType System.Type The type of the enumeration.
selectedValues List A list of string values to be considered selected in the returned list.
return List

ListFromEnum() public static method

Creates a list of enhanced select list items for all values in a specific enum type.
public static ListFromEnum ( Type enumType, string selectedValues ) : List
enumType System.Type The type of the enumeration.
selectedValues string A comma separated string of values to be considered selected in the returned list.
return List