---
title: Control to object data pull
summary: Pulls current control values back into bound business-object properties, with type coercion.
status: draft
owner: SAIF documentation team
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Binding.Infragistics103
reference_type: embedded
operation_id: OP-BIND-003
trigger: Explicit clsObjectBindManager.BindToObject() call, or invoked as the first step of Validate()/RefreshValidation()
---

# Control to object data pull

This operation iterates registered binders and pulls each control's current displayed value back into the bound business-object property, applying binder-specific type coercion.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-BIND-003 |
| **Trigger** | Explicit call to `BindToObject(inAllControls)`, or invoked as the first step of `Validate()`/`RefreshValidation()` |
| **Inputs** | `inAllControls` flag (default `False`); each binder's current control value |
| **Outputs** | Business-object property values updated from control state |
| **Primary components** | `clsObjectBindManager.BindToObject`, `clsObjectBinderBase.ControlToObject` (per concrete binder), `clsObjectBinderBase.SetObjectValue`/`SetObjectValueAsString` |
| **Entry point** | `SAIF.Presentation.Web.Binding.Infragistics103\clsObjectBindManager.vb` |

## Steps

1. Iterate `m_Bindings`; select binders where `inAllControls` is true OR the binder's `UseEvents` is false.
2. For each selected binder with `BindType` = `ControlToObject` or `TwoWay`, call `Binder.ControlToObject()`.
3. Each concrete `ControlToObject()` reads the control's native value, performs type coercion appropriate to the target property (e.g., `clsTextBoxBinder` uses `Convert.ChangeType` guarded by a swallowed `Exception` catch; `clsDDLBinder.ControlToObject` switches on `ObjectDataType` — Date/Decimal/Integer/String/Boolean/Enum — calling `[Enum].Parse` for enum targets), then calls `SetObjectValue`/`SetObjectValueAsString` (reflection `PropertyInfo.SetValue`, with optional object-side padding).
   - On failure: `clsTextBoxBinder.ControlToObject` silently swallows conversion exceptions (`Catch ex As Exception` with an empty body) — a failed conversion leaves the object property unchanged and is not surfaced to the caller.*

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([BindToObject called]) --> Iterate[Iterate m_Bindings]
	Iterate --> Select{inAllControls or UseEvents false?}
	Select -->|No| Skip[Skip binder]
	Select -->|Yes| BindTypeCheck{BindType is ControlToObject or TwoWay?}
	BindTypeCheck -->|No| Skip
	BindTypeCheck -->|Yes| ReadControl[Read native control value]
	ReadControl --> Coerce[Type coercion per binder]
	Coerce -->|Success| SetProp[SetObjectValue via reflection]
	Coerce -->|Exception| Swallow[Swallow exception, leave property unchanged]
	SetProp --> Skip
	Swallow --> Skip
	Skip --> More{More binders?}
	More -->|Yes| Iterate
	More -->|No| EndOk([Object properties updated])
```

## Failure and edge-case behavior
- Conversion exceptions during `ControlToObject()` are caught and swallowed in at least `clsTextBoxBinder`, leaving the property at its prior value without notifying the caller.*

## 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\ASPControls\clsTextBoxBinder.vb`
- `SAIF.Presentation.Web.Binding.Infragistics103\ASPControls\clsDDLBinder.vb`
