Push object values into controls (object to control)¶
Populate bound controls from the current business-object property values.
| Field | Value |
|---|---|
| Operation ID | OP-BIND-003 |
| Trigger | binder.DataBind() explicit call, or automatically on PreRender when AutoBind is True |
| Inputs | Registered binders and their bind sources |
| Outputs | Controls populated with business object values |
| Primary components | clsObjectBindManager.DataBind, clsObjectBindManager.OnPreRender, each binder's ObjectToControl |
| Entry point | SAIF.Presentation.Web.Binding.Infragistics111/clsObjectBindManager.vb |
Steps¶
- Iterate
m_Bindingsand skip any binder whoseBindTypeis notObjectToControlorTwoWay. (BR-BIND-010) - Call
Binder.ObjectToControl(). - Simple-value binders read the property via
GetObjectValueAsString(usingTypeDescriptor/PropertyDescriptorand the property'sTypeConverter) and assign it to the control's text/value property; aNothingbind source is skipped. (BR-BIND-011) (BR-BIND-012) - When padding is configured, the retrieved string is left- or right-padded to the configured length with the configured character before it reaches the control. (BR-BIND-013)
- Typed binders branch on their configured target type.
clsWebNumericEditBinderselects the Infragistics property named byNumericControlProperty(Text,Value,ValueByte,ValueDecimal,ValueDouble,ValueFloat,ValueInt,ValueLong,ValueShort); when the target type isNullableDecimaland the object value isNothing, it writesDouble.NaNto the control. (BR-BIND-014) (BR-BIND-015) clsCheckBoxBindersetsCheckedfromCBool(value)for aBooleantarget, or by case-insensitively comparing the value to the configured checked string for aStringtarget. (BR-BIND-016)- Grid binders assign the collection to the grid's
DataSourceand call the grid'sDataBind(). (BR-BIND-017) clsCustomValidator.ObjectToControlis a no-op returningTrue.OnPreRenderrunsDataBind()whenAutoBindisTrue, thenSaveStateValueswritesAutoBindintoViewState. (BR-BIND-018)
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([DataBind / PreRender AutoBind]) --> S1[Iterate m_Bindings]
S1 --> D{BindType is ObjectToControl or TwoWay?}
D -->|No| Skip[Skip binder]
D -->|Yes| S2[Binder.ObjectToControl]
S2 --> S3{Bind source Nothing?}
S3 -->|Yes| Skip
S3 -->|No| S4[Read value via GetObjectValueAsString / typed branch]
S4 --> S5[Apply padding if configured]
S5 --> S6[Write value to control]
S6 --> End([Control shows object value])
Failure and edge-case behavior¶
- A binder bound to a
Nothingobject is skipped so the page still renders (BR-BIND-011).
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