AutoBindTextbox¶
AutoBindTextbox is the auto-binding wrapper around a plain ASP.NET TextBox, used for free-text model properties throughout the SAIF presentation stack. On TextChanged it pushes the box's current text into the bound model property by reflection and re-validates, giving free-text fields the same automatic bind/validate/style behavior as the Infragistics-backed editors without requiring an Infragistics control. (BR-AJAX-007)
Purpose¶
- Wraps a standard
TextBoxso free-text values participate in the same auto-binding, validation, and styling pipeline as the Infragistics editors, via AutoBindControlAncestor. - Captures a user's typed text on
TextChangedand immediately writes it back to the bound model property. (BR-AJAX-007)
Context¶
- Namespace:
SAIF.Presentation.Web.Controls.V2.AJAX - Assembly/package:
SAIF.Presentation.Web.Controls.AJAX.Infragistics111(packaged inSAIF.BOF.Presentation.Web.Infragistics111) - Base class: AutoBindControlAncestor
Public members¶
| Member | Signature | Purpose |
|---|---|---|
Textbox_TextChanged |
Sub Textbox_TextChanged(sender As Object, e As EventArgs) |
Copies the inner TextBox's current text into Value, then calls BindToObject and, if AutoValidate, Validate() (BR-AJAX-007, BR-AJAX-006) |
OverrideFocus |
Sub OverrideFocus() |
Public method whose entire body is a single unused local variable assignment — dead code with a misleading name* |
Inherited public members¶
Members in this section are inherited from AutoBindControlAncestor in SAIF.Presentation.Web.Controls.AJAX.Infragistics111. They are available on this type through inheritance.
| Member | Signature | Purpose | Origin |
|---|---|---|---|
AutoPostback |
Property AutoPostback As Boolean |
Controls whether the inner editor posts back on change | SAIF.Presentation.Web.Controls.AJAX.Infragistics111 — AutoBindControlAncestor |
AutoBind |
Property AutoBind As Boolean |
Enables or disables participation in BindingManager.DataBind |
SAIF.Presentation.Web.Controls.AJAX.Infragistics111 — AutoBindControlAncestor |
AutoValidate |
Property AutoValidate As Boolean (default True) |
Enables automatic validation after a user edit | SAIF.Presentation.Web.Controls.AJAX.Infragistics111 — AutoBindControlAncestor |
AutoValidateOnDataBind |
Property AutoValidateOnDataBind As Boolean (default True) |
Enables automatic validation after data binding | SAIF.Presentation.Web.Controls.AJAX.Infragistics111 — AutoBindControlAncestor |
RootBindingObject |
Property RootBindingObject As Object |
The page model instance assigned by BindingManager |
SAIF.Presentation.Web.Controls.AJAX.Infragistics111 — AutoBindControlAncestor |
BoundObject |
ReadOnly Property BoundObject As Object |
Object resolved by walking BindSource from RootBindingObject |
SAIF.Presentation.Web.Controls.AJAX.Infragistics111 — AutoBindControlAncestor |
BindSource |
Property BindSource As String |
Dotted model path to BoundObject |
SAIF.Presentation.Web.Controls.AJAX.Infragistics111 — AutoBindControlAncestor |
BindProperty |
Property BindProperty As String |
Name of the property on BoundObject this control reads/writes |
SAIF.Presentation.Web.Controls.AJAX.Infragistics111 — AutoBindControlAncestor |
Value |
Property Value As Object |
The editor's current value | SAIF.Presentation.Web.Controls.AJAX.Infragistics111 — AutoBindControlAncestor |
DataBind |
Overrides Sub DataBind() |
Binds the model value into the control | SAIF.Presentation.Web.Controls.AJAX.Infragistics111 — AutoBindControlAncestor |
StyleControl |
Sub StyleControl(inValid As Boolean) |
Paints the editor red when invalid, resets it otherwise | SAIF.Presentation.Web.Controls.AJAX.Infragistics111 — AutoBindControlAncestor |
Validate |
Function Validate() As Boolean |
Runs validation and updates the page error label | SAIF.Presentation.Web.Controls.AJAX.Infragistics111 — AutoBindControlAncestor |
RootObject |
ReadOnly Property RootObject As Object |
The hosting page's Model property value |
SAIF.Presentation.Web.Controls.AJAX.Infragistics111 — SAIFAJAXControlAncestor |
Behavioral notes¶
OverrideFocus's body is a single dead local-variable assignment (Dim i As Integer = 1); calling it has no observable effect.*- All bind/validate behavior otherwise comes unchanged from
AutoBindControlAncestor; this class only supplies the concreteTextBoxand its change-event wiring.
Constraints and usage notes¶
- Because
StyleControlandValidateare inherited unchanged, the sameLblErrorMsgnaming contract applies. (BR-AJAX-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.
Sources¶
SAIF.Presentation.Web.Controls.AJAX.Infragistics111/AutoBindTextbox.vb