src/MvcContrib.FluentHtml/Elements/SelectBase.cs
/// <summary>
/// Set the options for the select list.
/// </summary>
/// <typeparam name="TSource">The type of the source item.</typeparam>
/// <typeparam name="TKey">The key for the group selector.</typeparam>
/// <param name="values">The items used to create the select list.</param>
/// <param name="valueField">The name of the member to use as the value of the select list.</param>
/// <param name="textField">The name of the member to use as the text of the select list.</param>
/// <param name="groupSelector">Function used to group items in the select list.</param>
Set the options for the select list.
Set the options for the select list .
public virtual T Options<TSource, TKey>(IEnumerable<TSource> values, string valueField, string textField, Func<TSource, TKey> groupSelector)
		{
			_optionChoices.Set(values, valueField, textField, groupSelector);
			return (T)this;
		}
public virtual T Options < TSource , TKey > ( IEnumerable < TSource > values , string valueField , string textField , Func < TSource , TKey > groupSelector ) { _optionChoices . Set ( values , valueField , textField , groupSelector ) ; return ( T ) this ; }
Set the options for the select list.
Set the options for the select list .
values
IEnumerable<TSource>
The items used to create the select list.
The items used to create the select list .
valueField
string
The name of the member to use as the value of the select list.
The name of the member to use as the value of the select list .
textField
string
The name of the member to use as the text of the select list.
The name of the member to use as the text of the select list .
groupSelector
Func<TSource, TKey>
Function used to group items in the select list.
Function used to group items in the select list .
typeparam
The type of the source item.
The type of the source item .
typeparam
The key for the group selector.
The key for the group selector .