Skip to content

Load a drop-down list

This operation binds a target list control (or grid column) to a data source, mapping the caller's value/text field names, and optionally inserts a leading blank entry in one of three representations.

Field Value
Operation ID OP-CORE-011
Trigger Consuming page binding a list control
Inputs Target list control or grid column, data source, value/text fields, DDLAddItems blank-entry mode
Outputs Populated list control or grid drop-down editor provider
Primary components Utilities.clsControlManager.LoadDDL (ten overloads), Utilities.clsControlManager.AddDropDownProvider
Entry point SAIF.Presentation.Web.Core.Infragistics111/clsControlManager.vb

Steps

  1. Clear the target control's existing items.
  2. Bind the supplied data source, mapping the caller-supplied value and text member names.
  3. Insert a leading blank entry per the DDLAddItems mode: (BR-CORE-032)
  4. BlankLiteral: insert a literal blank entry.
  5. EmptyString: insert an entry with an empty string value.
  6. Space: insert an entry containing a single space.
  7. For WebDataGrid, AddDropDownProvider registers a DropDownProvider against the named column so in-grid editing uses the list rather than free text.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([LoadDDL called]) --> S1[Clear existing items]
    S1 --> S2[Bind data source with value/text field mapping]
    S2 --> S3{DDLAddItems mode?}
    S3 -->|BlankLiteral| S4[Insert literal blank entry]
    S3 -->|EmptyString| S5[Insert empty-string entry]
    S3 -->|Space| S6[Insert single-space entry]
    S4 --> S7{Target is WebDataGrid column?}
    S5 --> S7
    S6 --> S7
    S7 -->|Yes| S8[AddDropDownProvider registers grid editor]
    S7 -->|No| EndOk([List control populated])

Failure and edge-case behavior

  • None of the ten LoadDDL overloads validate that the supplied value/text field names exist on the data source; a mismatch would surface as a runtime binding exception.**

Sources

  • SAIF.Presentation.Web.Core.Infragistics111/clsControlManager.vb