An individual binding item. A BindingItem maps a source object - a property/field or database field - to a property of a Control object.
The object is a child for the DataBinder object which acts as a master object that performs the actual binding of individual BingingItems.
Binding Items can be attached to controls and if the control implements the IDataBinder.
Note: This class inherits from Component so the designer can properly render the item as an extender control.
System.Web.UI.Control
Westwind.Web.Controls.DataBindingItem
public class DataBindingItem : Control
Class Members
Member | Description | |
---|---|---|
Constructor |
Default Constructor | |
Validate |
Use this event to hook up special validation logic. Called after binding completes. Return false to indicate validation failed | |
DataBind |
Binds a source object and property to a control's property. For example you can bind a business object to a the text property of a text box, or a DataRow field to a text box field. You specify a binding source object (Customer.Entity or Customer.DataRow) and property or field(Company, FirstName) and bind it to the control and the property specified (Text). public void DataBind() public void DataBind(Control container) |
|
OnValidate |
Fires the Validation Event public bool OnValidate() |
|
ToString |
Returns a the control bindingsource and binding source member public virtual string ToString() |
|
Unbind |
Unbinds control properties back into the control source. public void Unbind() public void Unbind(Control BindingContainerControl) |
|
Binder |
Reference to the DataBinder parent object. | |
BindingErrorMessage |
An error message that gets set if there is a binding error on the control. If this value is pre-set this value is used instead of an auto-generated message | |
BindingMode |
Determines how databinding and unbinding is done on the target control. One way only fires DataBind() and ignores Unbind() calls. Two-way does both. None effectively turns off binding. | |
BindingProperty |
Property that is bound on the target controlId | |
BindingSource |
The binding source object that is the source for databinding. This is an object of some sort and can be either a real object or a DataRow/DataTable/DataSet. If a DataTable is used the first row is assumed. If a DataSet is used the first table and first row are assumed. | |
BindingSourceMember |
The property or field on the Binding Source that is bound. Example: BindingSource: Customer.Entity BindingSourceMember: Company | |
BindingSourceObject |
An instance of the object that the control is bound to Optional - can be passed instead of a BindingSource string. Using a reference is more efficient. Declarative use in the designer always uses strings, code base assignments should use instances with BindingSourceObject. | |
ControlId |
The ID of the control to that is bound. | |
ControlInstance |
An optional instance of the control that can be assigned. Used internally by the DataBindiner to assign the control whenever possible as the instance is more efficient and reliable than the string name. | |
DisplayFormat |
Format Expression ( {0:c) ) applied to the binding source when it's displayed. Watch out for two way conversion issues when formatting this way. If you create expressions and you are also saving make sure the format used can be saved back. | |
EnableViewState |
||
ErrorMessageLocation |
Determines how binding and validation errors display on the control | |
HtmlEncode |
Determines whether the content displayed is Html encoded to prevent script injection | |
ID |
||
IsBindingError |
Internal property that lets you know if there was binding error on this control after binding occurred | |
IsRequired |
If set requires that the control contains a value, otherwise a validation error is thrown Useful mostly on TextBox controls only. | |
UnboundValue |
The value that is to be assigned to the control after unbinding. | |
UserFieldName |
A descriptive name for the field used for error display | |
Visible |
Requirements
Namespace: Westwind.Web.ControlsAssembly: westwind.web.webforms.dll
© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic