iAutoBindingControl¶
iAutoBindingControl is the contract that lets BindingManager discover, bind, and validate a control by reflection without knowing its concrete type. Any control implementing this interface — directly or through a BindingContainer that implements it — is walked during page-level binding and page-level validity checks (BR-AJAX-002); AutoBindControlAncestor is the sole implementer in this library.
Purpose¶
- Defines the reflection-friendly two-way binding surface (
BindSource,BindProperty,RootBindingObject,BoundObject) thatBindingManagerandBindingUtilityoperate against without a concrete type reference. - Defines the self-validating contract (
IsValid,ErrorMessages,Validate()) that letsBindingManageraggregate page-level validity across heterogeneous controls. (BR-AJAX-013) - Defines the switches (
AutoBind,AutoPostback,AutoValidate,AutoValidateOnDataBind) that let a control opt in or out of automatic binding and validation behavior per instance.
Context¶
- Namespace:
SAIF.Presentation.Web.Controls.V2.AJAX - Assembly/package:
SAIF.Presentation.Web.Controls.AJAX.Infragistics111(packaged inSAIF.BOF.Presentation.Web.Infragistics111)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
AutoPostback |
Property AutoPostback As Boolean |
Controls whether the underlying editor posts back on change |
AutoBind |
Property AutoBind As Boolean |
Enables or disables participation in BindingManager.DataBind |
AutoValidate |
Property AutoValidate As Boolean |
Enables or disables automatic validation after a user edit (BR-AJAX-006) |
AutoValidateOnDataBind |
Property AutoValidateOnDataBind As Boolean |
Enables or disables automatic validation after data binding (BR-AJAX-006) |
RootBindingObject |
Property RootBindingObject As Object |
The page model instance assigned by BindingManager, used as the root of the BindSource path walk |
BoundObject |
ReadOnly Property BoundObject As Object |
The object resolved by walking BindSource from RootBindingObject; the target of a bind (BR-AJAX-004) |
BindSource |
Property BindSource As String |
Dotted model path from the root object to BoundObject (e.g. Submission.Locations.Primary) |
BindProperty |
Property BindProperty As String |
Name of the property on BoundObject to read or write |
IsBound |
ReadOnly Property IsBound As Boolean |
Reports whether the control currently has a resolvable bound target |
IsValid |
ReadOnly Property IsValid As Boolean |
Current validity of the control's bound value, sourced from IDataErrorInfo (BR-AJAX-008) |
ErrorMessages |
ReadOnly Property ErrorMessages As String |
Assembled, deduplicated validation message text for the bound property (BR-AJAX-010) |
Value |
Property Value As Object |
The control's current editor value, copied to/from BoundObject.<BindProperty> on bind/edit |
DataBind |
Sub DataBind() |
Pushes the model value into the control (implementation-specific) |
BindToControl |
Sub BindToControl() |
Resolves BoundObject and copies its property value into Value (BR-AJAX-004) |
BindToObject |
Sub BindToObject() |
Copies Value back into BoundObject.<BindProperty> (BR-AJAX-004) |
StyleControl |
Sub StyleControl(inValid As Boolean) |
Applies visual valid/invalid styling to the editor (BR-AJAX-012) |
Validate |
Function Validate() As Boolean |
Runs validation, writes the page error label, and styles the control (BR-AJAX-011) |
Behavioral notes¶
- All resolution against
BindSource/BindPropertyis by reflection/TypeDescriptorwith no compile-time checking, and failures are swallowed by the implementing helper rather than raised. (BR-AJAX-005) Validateis documented by the sole implementation (AutoBindControlAncestor) to always returnTrueregardless of the control's actual validity, so callers must readIsValidseparately rather than trust the return value.*
Constraints and usage notes¶
- A control that implements neither
iAutoBindingControldirectly nor exposes aBindingContainerthat does is silently skipped byBindingManager— it participates in no automatic binding or validation. (BR-AJAX-002, BR-AJAX-003)
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.
Sources¶
SAIF.Presentation.Web.Controls.AJAX.Infragistics111/iAutoBindingControl.vb