Register a binding¶
Attach a control to a business-object property so the two can move data and be validated together.
| Field | Value |
|---|---|
| Operation ID | OP-BIND-001 |
| Trigger | Application page setup (typically Configure or Page_Load) |
| Inputs | A control, a business object (or collection), the target property name, an optional …BindingArgs, an optional UseEvents flag, an optional BindTypes value (default TwoWay) |
| Outputs | A concrete binder appended to m_Bindings; the validation object registered in m_ValidationObjects |
| Primary components | clsObjectBindManager.Add (≈60 overloads), clsObjectBindManager.AddBinder |
| Entry point | SAIF.Presentation.Web.Binding.Infragistics111/clsObjectBindManager.vb |
Steps¶
- Select the binder implementation matching the control's compile-time type — the overload resolution itself performs the dispatch (for example
TextBox→clsTextBoxBinder,UltraWebGrid→clsUltraGridBinder,WebDataGrid→clsWebDataGridBinder). (BR-BIND-001) - Populate the binder's
BindSource,BindProperty,FormControl,BindTypeand any control-specific settings (target data type, control bind property, padding, checked/unchecked strings, hierarchical band keys). SettingBindSourcealso sets the validation source. (BR-BIND-002) - Set
UseEventson the binder from the caller's flag, defaulting to the manager'sUseEvents. (BR-BIND-003) - Call
AddBinder, which computes the binder'sValidationKeyand registers the validation object inm_ValidationObjectsunder that key when the key is non-empty and not already present. (BR-BIND-004) (BR-BIND-005) - Delegates to
clsObjectBinderBase.ValidationKey, which callsIsSAIFFrameWorkObject(BR-BIND-061) and, for framework objects, reads theMyGuidproperty from the business object.* - Append the binder to
m_Bindings.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Add call]) --> S1[Resolve binder by control type]
S1 --> S2[Populate BindSource, BindProperty, FormControl, BindType]
S2 --> S3[Set UseEvents]
S3 --> D{Validation key empty?}
D -->|No| S4[Register in m_ValidationObjects]
D -->|Yes| S5[Skip source validation registration]
S4 --> S6[Append binder to m_Bindings]
S5 --> S6
S6 --> End([Binding registered])
Failure and edge-case behavior¶
- A
Nothingvalidation object produces an empty key and is not registered for source validation (BR-BIND-005).
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. Statements marked with † were retrieved from dependency library documentation via the Legends CLI RAG service.
Sources¶
- SAIF.Presentation.Web.Binding.Infragistics111/clsObjectBindManager.vb