Skip to content

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 Enum type via EnumDatasource, avoiding a manual item-by-item bind BR-V2-027.
  • Renders as a styled read-only textbox instead of an interactive drop-down when ReadOnly is set BR-V2-030.
  • Maps between the selected item's text and its underlying enum value bidirectionally through SelectedItemAsEnum BR-V2-036.

Context

  • Namespace: SAIF.Presentation.Web.Controls.V2
  • Assembly/package: SAIF.Presentation.Web.Controls.V2 (packaged in SAIF.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 Render throws, the control clears the current selection and retries exactly once before giving up BR-V2-035.

Constraints and usage notes

  • EnumDatasource must be an actual System.Type representing an Enum; non-enum types are not supported.

Sources

  • SAIF.Presentation.Web.Controls.V2/SAIFDropDownList.vb