Bind page controls to the model¶
This operation resolves the hosting page's Model object once and pushes it into every control on the page that participates in automatic binding, so that each control can subsequently bind its own value.
| Field | Value |
|---|---|
| Operation ID | OP-AJAX-01 |
| Trigger | Page code-behind calls BindingManager.DataBind() |
| Inputs | The page's Model property, Page.Controls tree |
| Outputs | Every auto-binding control on the page has RootBindingObject set |
| Primary components | BindingManager.DataBind |
| Entry point | SAIF.Presentation.Web.Controls.AJAX.Infragistics111/BindingManager.vb |
Steps¶
- Resolve the root object once via
BindingUtility.GetObjectValue(Page, "Model")and cache it. (BR-AJAX-001) - The hosting page must expose a property literally named
Model;BindingManager.RootObjectNameis publicly settable but the privateGetRootObjecthard-codes"Model", so the setting is not honored.* - Walk
Page.Controlsrecursively; for any control that has children, recurse, otherwise callBindControl. (BR-AJAX-002) BindControlassignsRootBindingObject = RootObjectwhen the control is aniAutoBindingControl, or when itsBindingContaineris one. (BR-AJAX-002)- If the control is neither, it is silently skipped.
- Only leaf controls are inspected, so an
iAutoBindingControlthat itself has children is bound through its child'sBindingContainerrather than directly.*
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([BindingManager.DataBind called]) --> Resolve[Resolve Model via reflection]
Resolve --> Walk[Walk Page.Controls recursively]
Walk --> Leaf{Leaf control?}
Leaf -->|No| Walk
Leaf -->|Yes| Check{Is iAutoBindingControl<br>or BindingContainer is one?}
Check -->|Yes| Assign[Assign RootBindingObject]
Check -->|No| Skip([Skip control])
Assign --> Done([All controls bound])
Failure and edge-case behavior¶
- A control that is neither an
iAutoBindingControlnor hosted by one is silently skipped — no error is raised.* - An
iAutoBindingControlwith its own children is bound through its child'sBindingContainerrather than directly, because only leaf controls are inspected.*
Related documentation¶
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with**could not be confirmed; treat as unknown until verified.
Sources¶
SAIF.Presentation.Web.Controls.AJAX.Infragistics111/BindingManager.vbSAIF.Presentation.Web.Controls.AJAX.Infragistics111/BindingUtility.vb