---
title: Cascade grid drop-down value lists
summary: Binds a parent and child UltraWebGrid column's value lists and registers the client script that filters the child list from the parent's selected value.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.Infragistics111
reference_type: package
operation_id: OP-01
trigger: Consuming page calls DataBind() on clsDropDownController (directly or via page-level DataBind)
---

# Cascade grid drop-down value lists

This operation binds two `UltraWebGrid` columns' value lists from consumer-supplied data sources, projects both sources into flattened lookup items, and registers the client script that filters the child column's options based on the parent column's selected value.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-01 |
| **Trigger** | Consuming page calls `DataBind()` on the control (directly or via page-level `DataBind`) |
| **Inputs** | `Column1`, `Column2`, `List1`, `List2`, `List1Code`, `List1Display`, `List2Code`, `List2Display`, `List2Key` |
| **Outputs** | Bound `ValueList` on both grid columns; populated `l1`/`l2`; a registered client script block named `DD` |
| **Primary components** | `clsDropDownController.DataBind` |
| **Entry point** | `SAIF.Presentation.Web.Controls.Infragistics111/clsDropDownController.vb` |

## Steps

1. Call `MyBase.DataBind()` to run the standard `Control` data-binding pass.
   - On failure: errors propagate from the base implementation.
2. Assign `List1` to `Column1.ValueList.DataSource` and set `DisplayMember`/`ValueMember` from `List1Display`/`List1Code`, then call `Column1.ValueList.DataBind()` ([BR-CTL-004](../business-rules.md#br-ctl-004-explicit-value-and-display-members-required-for-cascaded-columns)).
   - On failure: an unset `Column1` raises a `NullReferenceException` — no guard exists.
3. Repeat step 2 for `Column2` using `List2`, `List2Display`, `List2Code` ([BR-CTL-004](../business-rules.md#br-ctl-004-explicit-value-and-display-members-required-for-cascaded-columns)).
   - On failure: same failure mode as step 2, for `Column2`.
4. Set `Column1.Band.Grid.DisplayLayout.ClientSideEvents.BeforeEnterEditModeHandler` to `"BeforeEdit" & Column2.Key`, wiring the generated function into the grid ([BR-CTL-003](../business-rules.md#br-ctl-003-cascade-handler-name-derived-from-child-column-key)).
5. Project every item in `List1` into a `ListItem` by reflecting over `TypeDescriptor.GetProperties`, copying the property matching `List1Code` into `id` and the property matching `List1Display` into `desc`, but only when the property type has a `TypeConverter` that can convert to `System.String` ([BR-CTL-005](../business-rules.md#br-ctl-005-only-string-convertible-properties-populate-generated-lists)). Add each projected item to `l1`.
   - If a property's converter cannot target `String`: the property is skipped, leaving `id`/`desc` `Nothing` for that entry.
6. Project every item in `List2` the same way, additionally copying the property matching `List2Key` into `key` ([BR-CTL-005](../business-rules.md#br-ctl-005-only-string-convertible-properties-populate-generated-lists), [BR-CTL-002](../business-rules.md#br-ctl-002-case-insensitive-parent-child-key-match)). Add each projected item to `l2`.
7. Call [Generate the cascade script](generate-cascade-script.md) and discard the result, then call it a second time and register the returned script with `Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "DD", …)`.
   - The first call is redundant work — the script is built twice per data-bind, with no observable side effect from the discarded call.*

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([DataBind called]) --> S1["MyBase.DataBind()"]
	S1 --> S2["Bind Column1.ValueList<br>from List1"]
	S2 --> S3["Bind Column2.ValueList<br>from List2"]
	S3 --> S4["Wire BeforeEnterEditModeHandler<br>to BeforeEdit + Column2.Key"]
	S4 --> S5["Project List1 items into l1"]
	S5 --> S6["Project List2 items into l2"]
	S6 --> S7["Generate + register<br>cascade script (DD)"]
	S7 --> EndOk([DataBind complete])
```

## Failure and edge-case behavior
- An unset `Column1` or `Column2` raises an unhandled `NullReferenceException` — there is no null guard before the `ValueList` assignments.
- A source item whose `List1Code`/`List1Display`/`List2Code`/`List2Display`/`List2Key` property is not string-convertible is silently skipped rather than causing a bind failure ([BR-CTL-005](../business-rules.md#br-ctl-005-only-string-convertible-properties-populate-generated-lists)).

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

## Sources
- `SAIF.Presentation.Web.Controls.Infragistics111/clsDropDownController.vb`
