SAIFDropDownList¶
A drop-down list that can bind directly to an Enum type and can render as a read-only styled textbox, and that retries its render once with the selection cleared if the base render throws BR-V2-027.
Purpose¶
- Populates its item list directly from an
Enumtype viaEnumDatasource, avoiding a manual item-by-item bind BR-V2-027. - Renders as a styled read-only textbox instead of an interactive drop-down when
ReadOnlyis set BR-V2-030. - Maps between the selected item's text and its underlying enum value bidirectionally through
SelectedItemAsEnumBR-V2-036.
Context¶
- Namespace:
SAIF.Presentation.Web.Controls.V2 - Assembly/package:
SAIF.Presentation.Web.Controls.V2(packaged inSAIF.BOF.Presentation.Web.Infragistics111.nuspec)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| EnumDatasource | Public Property EnumDatasource As System.Type |
Enum type used to auto-populate the list's items BR-V2-027. |
| MapUnderscore | Public Property MapUnderscore As Boolean |
When true, maps underscores in enum member names to spaces in the displayed text. |
| ReadOnly | Public Property ReadOnly As Boolean |
Renders a styled textbox instead of the interactive drop-down when true BR-V2-030. |
| ValueText | Public Property ValueText As String |
Text shown in the read-only textbox rendering. |
| SelectedItemAsEnum | Public Property SelectedItemAsEnum As Object |
Gets or sets the selection using the bound enum type, translating to/from the underlying text/value BR-V2-036. |
| Render | Public Overrides Sub Render(writer As HtmlTextWriter) |
Renders per ReadOnly; retries once with the selection cleared if the base render throws BR-V2-035. |
Behavioral notes¶
- If the base
Renderthrows, the control clears the current selection and retries exactly once before giving up BR-V2-035.
Constraints and usage notes¶
EnumDatasourcemust be an actualSystem.Typerepresenting anEnum; non-enum types are not supported.
Sources¶
SAIF.Presentation.Web.Controls.V2/SAIFDropDownList.vb