Bind a control to its model value¶
This operation reads the current value of the model property named by BindSource/BindProperty and copies it into the control's own Value property, then optionally validates the control.
| Field | Value |
|---|---|
| Operation ID | OP-AJAX-02 |
| Trigger | ASP.NET data-binding phase, or an explicit DataBind call |
| Inputs | RootBindingObject, BindSource, BindProperty |
| Outputs | Control's Value property populated; optional validation run |
| Primary components | AutoBindControlAncestor.DataBind, BindToControl |
| Entry point | SAIF.Presentation.Web.Controls.AJAX.Infragistics111/AutoBindControlAncestor.vb |
Steps¶
- Call
MyBase.DataBind(). - If
RootBindingObjectisNothing, return without binding. (BR-AJAX-003) - On this condition, the control renders its design-time value unchanged.
BindToControlresolvesBoundObjectby walking the dottedBindSourcepath from the root object, then copiesBoundObject.<BindProperty>into this control'sValueproperty. (BR-AJAX-004)- On reflection failure: the exception is caught and ignored, leaving
Valueunchanged.* - If
AutoValidateOnDataBindis set (defaultTrue), runValidate(). (BR-AJAX-006)
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([DataBind triggered]) --> Base[MyBase.DataBind]
Base --> Root{RootBindingObject<br>set?}
Root -->|No| EndUnbound([Render design value])
Root -->|Yes| Resolve[Resolve BoundObject via BindSource path]
Resolve --> Copy[Copy BoundObject.BindProperty into Value]
Copy --> AutoValidate{AutoValidateOnDataBind?}
AutoValidate -->|Yes| Validate[Run Validate]
AutoValidate -->|No| EndBound([Value populated])
Validate --> EndBound
Failure and edge-case behavior¶
- Reflection failures during path resolution or property access are swallowed by
BindingUtility; the control'sValuesimply remains unchanged.*
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/AutoBindControlAncestor.vbSAIF.Presentation.Web.Controls.AJAX.Infragistics111/BindingUtility.vb