---
title: Register and initialize a control binding
summary: Registers a binder linking a WebForms/Infragistics control to a business-object property or collection.
status: draft
owner: SAIF documentation team
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Binding.Infragistics103
reference_type: embedded
operation_id: OP-BIND-001
trigger: Page/control developer code (Page_Load or similar) calling one of the ~90 Add() overloads on a clsObjectBindManager instance
---

# Register and initialize a control binding

This operation constructs and registers a concrete binder instance that links a single WebForms/Infragistics control to a bound business-object property (or collection, for list/grid controls). It runs once per control per page lifecycle, typically during `Page_Load`.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-BIND-001 |
| **Trigger** | Page/control developer code calling one of the ~90 `Add()` overloads (one family per control type) on a `clsObjectBindManager` instance |
| **Inputs** | Target control instance, bound object (or `IEnumerable` collection for list/grid controls), key property name, optional `BindTypes`, optional `UseEvents` flag, optional control-specific args (`PadArgs`, `CheckBoxBindingArgs`, `SAIFMaskEditBindingArgs`, `UltraGridBindingArgs`, `WebDataGridBindingArgs`, `HierarchialGridArgs`, etc.) |
| **Outputs** | A new binder instance of the matching concrete type appended to `m_Bindings`; entry added/skipped in `m_ValidationObjects` |
| **Primary components** | `clsObjectBindManager.Add` (overload family), `clsObjectBinderBase.ProcessControl`, `clsObjectBindManager.AddBinder` |
| **Entry point** | `SAIF.Presentation.Web.Binding.Infragistics103\clsObjectBindManager.vb` |

## Steps

1. Construct the concrete binder subclass matching the control type (e.g., `New clsTextBoxBinder`). No business rule applies; no SQL/table touch.
2. Set `FormControl`/type-specific control property, which triggers `ProcessControl(control)` in the base/derived class, capturing `m_Control` and `m_ControlType` (`GetType().Name`).
3. Set `BindType`, `UseEvents`, and any padding/args properties supplied by the caller.
4. Call `Init()` on the binder.
   - For event-driven, control-to-object or two-way binders, `Init()` wires the control's native change event (`TextChanged`, `SelectedIndexChanged`, etc.) to an internal `ValueChangedHandler` that calls `ControlToObject()` immediately on change.
5. Call the private `AddBinder(binder)` helper:
   - Compute `binder.ValidationKey` ([BR-BIND-006](../business-rules.md#br-bind-006-validation-key-derivation-for-saif-framework-objects)) via `IsSAIFFrameWorkObject` + `MyGuid` reflection, or the type name uppercased.
   - If the key is non-empty and not already present in `m_ValidationObjects`, add `(key, ValidationObject)`.
   - Always append the binder to `m_Bindings`.
6. No delegation to a referenced-library operation occurs in this sequence — all logic is local.*

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([Add called]) --> Construct[Construct concrete binder subclass]
	Construct --> SetControl[Set FormControl -> ProcessControl]
	SetControl --> SetProps[Set BindType, UseEvents, args]
	SetProps --> Init[Call Init]
	Init --> Events{UseEvents true and control-to-object/two-way?}
	Events -->|Yes| Wire[Wire native change event to ValueChangedHandler]
	Events -->|No| Skip[No event wiring]
	Wire --> AddBinder[AddBinder: compute ValidationKey]
	Skip --> AddBinder
	AddBinder --> Register[Register in m_ValidationObjects if new key]
	Register --> Append[Append binder to m_Bindings]
	Append --> EndOk([Binding registered])
```

## Failure and edge-case behavior
- If `ValidationKey` resolves to an empty string (no bound object, or unable to derive a key), the object is not added to `m_ValidationObjects`, but the binder is still appended to `m_Bindings`.*

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

## Sources
- `SAIF.Presentation.Web.Binding.Infragistics103\clsObjectBindManager.vb`
- `SAIF.Presentation.Web.Binding.Infragistics103\clsObjectBinderbase.vb`
