BindingManager¶
BindingManager is the page-level orchestrator that drives binding across every iAutoBindingControl on a page in a single call. Its DataBind() walks the entire Page.Controls tree once, resolving the model just once and pushing it into every discoverable auto-binding control, and it doubles as the single page-level validity gate consumers query via IsValid/ErrorMessages. (BR-AJAX-001, BR-AJAX-013)
Purpose¶
- Resolves the page's
Modelproperty once and pushes it asRootBindingObjectinto everyiAutoBindingControlreachable fromPage.Controls, so page code-behind never has to bind controls individually. (BR-AJAX-001, BR-AJAX-002) - Aggregates page-level validity by walking the same control tree and returning
Falseon the first invalid control, giving pages a single boolean gate for "can I submit". (BR-AJAX-013) - Aggregates deduplicated error text from every control into one combined message, avoiding repeated identical messages when several controls share a validation rule. (BR-AJAX-010)
Context¶
- Namespace:
SAIF.Presentation.Web.Controls.V2.AJAX - Assembly/package:
SAIF.Presentation.Web.Controls.AJAX.Infragistics111(packaged inSAIF.BOF.Presentation.Web.Infragistics111) - Base class:
System.Web.UI.WebControls.CompositeControl(.NET Framework)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
RootObjectName |
Property RootObjectName As String (default "Model") |
Declared as the name of the page property to bind from, but the private GetRootObject hard-codes "Model" and ignores this setting* |
DataBind |
Overrides Sub DataBind() |
Resolves the page's Model once, then recursively walks Page.Controls, assigning RootBindingObject on every iAutoBindingControl (or one whose BindingContainer is one) (BR-AJAX-001, BR-AJAX-002) |
IsValid |
ReadOnly Property IsValid As Boolean |
Walks the control tree and returns False on the first invalid auto-binding control found (BR-AJAX-013) |
ErrorMessages |
ReadOnly Property ErrorMessages As String |
Walks the control tree, appending each control's messages with <br> separators and skipping duplicates (BR-AJAX-010) |
Behavioral notes¶
RootObjectNameis publicly settable and defaults to"Model", but the privateGetRootObjectmethod hard-codes the literal"Model"rather than reading this property — whether the property is vestigial or the omission is a defect is unknown.**- Only leaf controls (controls with no children) are inspected for
iAutoBindingControl/BindingContainermembership during bothDataBindand the validity walk, so a compositeiAutoBindingControlthat itself has children is bound through its child'sBindingContainerrather than directly.* - A control that is neither an
iAutoBindingControlnor hosted by one is silently skipped in every walk — no error is raised. (BR-AJAX-002)
Constraints and usage notes¶
- The hosting page must expose a property literally named
Model; settingRootObjectNameto anything else has no effect. (BR-AJAX-001) - Because
IsValidshort-circuits on the first invalid control whileErrorMessagesalways walks the full tree, calling onlyIsValidwill not populate the complete aggregated error text — both must be read to get validity and full messages.
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.vb