LinkedSelectList¶
Implements IEnumerable<LinkedSelectListItem>, evaluating a source object collection through DataBinder.Eval-driven value/text/linked-value field expressions to produce the items LinkedDropdownHelper renders.
Purpose¶
- Implements
IEnumerable<LinkedSelectListItem>, evaluating a source object collection throughDataBinder.Eval-driven value/text/linked-value field expressions to produce the itemsLinkedDropdownHelperrenders.
Context¶
- Namespace:
SAIF.Web.Mvc.UI.Extensions - Assembly/package:
SAIF.Framework.Web.Mvc (source-shipping NuGet package) - Kind: class
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| LinkedSelectList(IEnumerable, string, string, string, IEnumerable) | public LinkedSelectList(IEnumerable items, string dataValueField, string dataTextField, string dataLinkedValueField, IEnumerable selectedValues) |
Captures the source collection, the field-name expressions used to evaluate each item's value/text/linked-value, and the collection of currently-selected values; throws if items is null. |
| DataLinkedValueField | public string DataLinkedValueField { get; private set; } |
Name of the field/property evaluated via DataBinder.Eval to produce each item's LinkValue. |
| DataTextField | public string DataTextField { get; private set; } |
Name of the field/property evaluated via DataBinder.Eval to produce each item's Text. |
| DataValueField | public string DataValueField { get; private set; } |
Name of the field/property evaluated via DataBinder.Eval to produce each item's Value. |
| Items | public IEnumerable Items { get; private set; } |
The source collection whose items are projected into LinkedSelectListItems. |
| SelectedValues | public IEnumerable SelectedValues { get; private set; } |
The collection of values compared (case-insensitively) against each item's evaluated value to determine selection; see BR-51. |
| GetEnumerator() | public virtual IEnumerator<LinkedSelectListItem> GetEnumerator() |
Returns an enumerator over the internally computed LinkedSelectListItem list, delegating to the internal GetListItems() evaluation. |
Behavioral notes¶
- The item-projection logic (
DataBinder.Eval-driven evaluation and case-insensitive selection matching) lives in the internalGetListItems()method, which is not part of the public surface; it is reached only throughGetEnumerator().
Sources¶
src/Web.Mvc/UI/Extensions/LinkedDropdownHelper.cs