---
title: clsObjectBinderBase
summary: API reference for clsObjectBinderBase.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Binding.Infragistics111
reference_type: package
---

# clsObjectBinderBase

`clsObjectBinderBase` is the `MustInherit` abstract base every concrete binder derives from. It defines the three-method binding contract (`Init`, `ObjectToControl`, `ControlToObject`) that `clsObjectBindManager` calls uniformly across all 24 concrete binders, and centralizes the reflection-based get/set helpers, padding support, `IDataErrorInfo`-driven error harvesting, and CSS/color error-state formatting that every binder shares.

## Purpose
- Define the `Init` / `ObjectToControl` / `ControlToObject` contract that lets `clsObjectBindManager` treat every control-specific binder uniformly.
- Provide shared reflection get/set (`GetObjectValueAsString`, `SetObjectValueAsString`) so concrete binders do not each reimplement `TypeDescriptor`/`TypeConverter` access ([BR-BIND-012](../../business-rules.md#br-bind-012-object-values-read-via-typeconverter)).
- Detect SAIF BOF business objects by base-class name and compute each binder's validation-registration key ([BR-BIND-004](../../business-rules.md#br-bind-004-validation-object-registered-once-by-key), [BR-BIND-061](../../business-rules.md#br-bind-061-framework-object-detected-by-base-class-name)).
- Harvest and format validation errors from `IDataErrorInfo`, and apply consistent error/valid control styling ([BR-BIND-031](../../business-rules.md#br-bind-031-dual-binder-validates-its-validation-pair)–[BR-BIND-040](../../business-rules.md#br-bind-040-valid-styling-by-control-type)).
- Support dual binding — a distinct validation object/property separate from the bind object/property.

## Context
- Namespace: `SAIF.Presentation.Web.Binding`
- Assembly/package: `SAIF.Presentation.Web.Binding.Infragistics111` (ILMerged into `SAIF.Presentation.Web.Infragistics111.dll`)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| Init | `Public MustOverride Sub Init()` | Subscribes the control's change event when `UseEvents` is `True` and the bind type calls for write-back ([BR-BIND-007](../../business-rules.md#br-bind-007-change-event-subscription-requires-useevents), [BR-BIND-008](../../business-rules.md#br-bind-008-change-event-subscription-requires-write-back-bind-type)). Overrides `clsObjectBinderBase.Init`. |
| ObjectToControl | `Public MustOverride Function ObjectToControl() As Boolean` | Pushes the bind source value into the control. Overrides `clsObjectBinderBase.ObjectToControl`. |
| ControlToObject | `Public MustOverride Function ControlToObject() As Boolean` | Pulls the control value back onto the bind source. Overrides `clsObjectBinderBase.ControlToObject`. |
| BindSource | `Public Property BindSource() As Object` | The business object (or collection) this binder reads and writes. Setting it also sets the binder's validation source unless dual binding overrides it ([BR-BIND-002](../../business-rules.md#br-bind-002-bindsource-sets-validation-source)). |
| BindProperty | `Public Property BindProperty() As String` | Name of the property on `BindSource` this binder gets/sets by reflection. |
| FormControl | `Public Property FormControl() As Control` | The ASP.NET/Infragistics control instance this binder targets; its `UniqueID` is the key used by `clsObjectBindManager.Binder` and `Update` lookups. |
| BindType | `Public Property BindType() As BindTypes` | Controls which directions data moves for this binder — `ObjectToControl`, `ControlToObject`, `TwoWay`, or `ValidateOnly` ([BR-BIND-010](../../business-rules.md#br-bind-010-databind-and-bindtoobject-respect-bind-type)). |
| UseEvents | `Public Property UseEvents() As Boolean` | Whether this binder subscribes to its control's change event in `Init` ([BR-BIND-007](../../business-rules.md#br-bind-007-change-event-subscription-requires-useevents), [BR-BIND-008](../../business-rules.md#br-bind-008-change-event-subscription-requires-write-back-bind-type)). |
| ValidationKey | `Friend Overridable ReadOnly Property ValidationKey() As String` | Computes the key under which this binder's validation object is registered — the business object's `MyGuid` for SAIF framework objects (via `IsSAIFFrameWorkObject`) or its type name otherwise ([BR-BIND-004](../../business-rules.md#br-bind-004-validation-object-registered-once-by-key)). |
| IsSAIFFrameWorkObject | `Friend Overridable ReadOnly Property IsSAIFFrameWorkObject() As Boolean` | Walks the bind source's runtime base-class chain for the names `clsBusinessBase` / `clsBusinessCollectionBase` to decide whether framework-specific keying and validation applies ([BR-BIND-061](../../business-rules.md#br-bind-061-framework-object-detected-by-base-class-name)). |
| GetObjectValueAsString | `Protected Function GetObjectValueAsString() As String` | Reads `BindProperty` from `BindSource` through `TypeDescriptor`/`PropertyDescriptor` and the property's `TypeConverter`, applying configured padding, for display in simple-value controls ([BR-BIND-012](../../business-rules.md#br-bind-012-object-values-read-via-typeconverter), [BR-BIND-013](../../business-rules.md#br-bind-013-padding-applied-before-display)). |
| SetObjectValueAsString | `Protected Sub SetObjectValueAsString(inValue As String)` | Writes a string value back onto `BindProperty`. Computes a padded value for `PadTarget.Object` but assigns the unpadded value to the property, so object-side padding has no observable effect.* |
| GetErrors | `Public Overridable Function GetErrors() As Boolean` | Selects the validation property/source for a dual binder (otherwise the bind property/source), casts it to `IDataErrorInfo`, and reads `Item(property)` to populate `ControlErrors` ([BR-BIND-031](../../business-rules.md#br-bind-031-dual-binder-validates-its-validation-pair), [BR-BIND-032](../../business-rules.md#br-bind-032-error-text-split-and-br-stripped), [BR-BIND-033](../../business-rules.md#br-bind-033-non-empty-error-text-flags-control)). |
| ControlErrors | `Public ReadOnly Property ControlErrors() As ArrayList` | The list of non-blank, CRLF-split, `<BR>`-stripped error message fragments harvested for this binder in the current validation pass. |
| SetControlFormat | `Public Sub SetControlFormat(inValid As Boolean)` | Applies error or valid CSS/color styling to `FormControl` based on control kind — `errorbordercolor`/`errorbackcolor` when invalid ([BR-BIND-037](../../business-rules.md#br-bind-037-error-styling-by-control-type), [BR-BIND-038](../../business-rules.md#br-bind-038-grids-never-styled-at-control-level)), `normal`/`defaultbackcolor` when valid, honoring an existing `disabledbackcolor` class ([BR-BIND-039](../../business-rules.md#br-bind-039-disabled-controls-not-restyled-on-success), [BR-BIND-040](../../business-rules.md#br-bind-040-valid-styling-by-control-type)). |
| SetDualBinding | `Friend Sub SetDualBinding(inValidationSource As Object, inValidationProperty As String)` | Records a validation object/property distinct from the bind object/property, so the control can display one object while validating another ([BR-BIND-059](../../business-rules.md#br-bind-059-dual-binding-separates-bind-and-validation-pairs)). |

## Behavioral notes
- Contains an empty `Private Sub Dummy()` with no observable effect.**

## Constraints and usage notes
- Concrete binders must implement all three contract methods; the shared members listed above are available to every derived binder without reimplementation.

> **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. They describe inherited behavior from the indicated origin library and should be verified if the dependency version changes.

## Sources
- SAIF.Presentation.Web.Binding.Infragistics111/clsObjectBinderbase.vb
