Re-point a binder at a new data source¶
Rebind an existing grid or drop-down control to a new collection after a postback, without re-registering it through Add.
| Field | Value |
|---|---|
| Operation ID | OP-BIND-008 |
| Trigger | Application replaces a grid's or drop-down's collection after a postback |
| Inputs | The control instance and the new data source |
| Outputs | The binder's bind source replaced and the control rebound |
| Primary components | clsObjectBindManager.Update (three overloads for UltraWebGrid, WebDataGrid, DropDownList) |
| Entry point | SAIF.Presentation.Web.Binding.Infragistics111/clsObjectBindManager.vb |
Steps¶
- Scan
m_Bindingsfor a binder whose runtime type name matches the expected binder class (clsUltraGridBinder,clsWebDataGridBinder,clsDDLBinder). (BR-BIND-055) - Skip binders whose
BindTypeis notObjectToControlorTwoWay. (BR-BIND-010) - Match the binder to the control by comparing
FormControlIDand the control'sUniqueID, case-insensitively. (BR-BIND-056) - Assign the new data source to
Binder.BindSourceand flag an update. - If an update was flagged, call
AddBinder(Binder)and thenBinder.ObjectToControl(). (BR-BIND-057)
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Application calls Update]) --> S1[Scan m_Bindings by binder class name]
S1 --> D1{BindType is ObjectToControl or TwoWay?}
D1 -->|No| Skip[Skip binder]
D1 -->|Yes| S2[Match FormControlID to control UniqueID]
S2 --> D2{Match found?}
D2 -->|No| Skip
D2 -->|Yes| S3[Assign new BindSource]
S3 --> S4[AddBinder again]
S4 --> S5[Binder.ObjectToControl]
S5 --> End([Control shows new data source])
Failure and edge-case behavior¶
- Step 5 calls
AddBinderon an already-registered binder, soUpdateappends a duplicate entry tom_Bindingson every call — repeated updates grow the binder collection and cause the same binder to be validated multiple times.*
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