---
title: MultiList selection and wildcard behavior
summary: Synchronizes MultiListControl's checkbox-list selection with its text box, enforcing mutual exclusivity for a configured wildcard item.
status: draft
owner: SAIF Documentation Team
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.V2
reference_type: package
operation_id: OP-V2-MULTILIST-001
trigger: CheckBoxList.SelectedIndexChanged or TextBox.TextChanged postback
---

# MultiList selection and wildcard behavior

This operation keeps `MultiListControl`'s checkbox list and text box in sync, representing selected items as a semicolon-delimited string, and enforcing mutual exclusivity between a configured wildcard ("All") item and any specific item selections.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-V2-MULTILIST-001 |
| **Trigger** | `CheckBoxList.SelectedIndexChanged` or `TextBox.TextChanged` postback. |
| **Inputs** | Selected checkbox items; typed text; configured `WildCardItem`. |
| **Outputs** | Updated text box value (semicolon-delimited selections, or the wildcard value); updated item selection/enabled state. |
| **Primary components** | `MultiListControl.m_CheckList_SelectedIndexChanged`, `MultiListControl.m_TextBox_TextChanged`. |
| **Entry point** | `SAIF.Presentation.Web.Controls.V2\MultiListControl.vb` |

## Steps

1. `m_CheckList_SelectedIndexChanged` (checkbox list changed):
   - If the designated `WildCardItem` is selected: sets the text box to just the wildcard value and disables all other checkbox items (mutual exclusivity). ([BR-V2-004](../business-rules.md#br-v2-004-wildcard-selection-in-multilistcontrol-is-mutually-exclusive-with-other-items))
   - Otherwise: concatenates all selected item texts (semicolon-delimited) into the text box and re-enables all items.
   - Raises the public `ListItemSelected` event.
2. `m_TextBox_TextChanged` (text box changed) mirrors this logic in reverse:
   - If the typed text contains the wildcard value: sets the text box to just the wildcard text and disables/selects items accordingly.
   - Otherwise: splits the typed text on `;` and marks matching list items as selected.
   - Raises the public `TextChanged` event.
3. `LayoutControls` (invoked from both `CreateChildControls` and `RenderContents`) branches CSS/positioning logic based on `Page.Request.Browser.Browser.ToUpper = "FIREFOX"` — a legacy browser-sniffing pattern*.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([CheckBoxList or TextBox change]) --> Source{Which control changed?}
	Source -->|CheckBoxList| WildCheck{WildCardItem selected?}
	WildCheck -->|Yes| WildSetText[Set text box to wildcard value, disable other items]
	WildCheck -->|No| ConcatText[Concatenate selected items into text box, enable all items]
	Source -->|TextBox| WildTyped{Typed text matches wildcard?}
	WildTyped -->|Yes| WildSetItems[Set text to wildcard, disable other items, select wildcard]
	WildTyped -->|No| SplitText[Split text on semicolon, select matching items]
	WildSetText --> Done([Raise selection/text-changed event])
	ConcatText --> Done
	WildSetItems --> Done
	SplitText --> Done
```

## Failure and edge-case behavior

- `MultiListControl.LayoutControls` branches CSS/positioning logic based on `Page.Request.Browser.Browser.ToUpper = "FIREFOX"`, which may not correctly detect modern Firefox user-agent strings*.
- The embedded `MultiList.js` client script (bundled as a `WebResource`) governs the client-side popup show/hide behavior for the checkbox list; its detailed logic was not independently traced in this operation's analysis*.

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

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

## Sources
- SAIF.Presentation.Web.Controls.V2\MultiListControl.vb
