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¶
- Clear the target control's existing items.
- Bind the supplied data source, mapping the caller-supplied value and text member names.
- Insert a leading blank entry per the
DDLAddItemsmode: (BR-CORE-032) BlankLiteral: insert a literal blank entry.EmptyString: insert an entry with an empty string value.Space: insert an entry containing a single space.- For
WebDataGrid,AddDropDownProviderregisters aDropDownProvideragainst 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
LoadDDLoverloads validate that the supplied value/text field names exist on the data source; a mismatch would surface as a runtime binding exception.**
Related documentation¶
Sources¶
SAIF.Presentation.Web.Core.Infragistics111/clsControlManager.vb