Version

DataBind Method (UltraComboEditor)

Updates the ValueListItems with the current values in the data source. After assigning or modifying the control's data source, call this method so that the items are synchronized. If the control is not bound to a data source then an InvalidOperationException will be thrown.
Syntax
'Declaration
 
Public Sub DataBind() 
public void DataBind()
Remarks

This method has two distinct, yet related, uses. By default the databinding process will occur on an as-needed basis. However, after setting the DataSource property this method can be called to force the databinding process to occur immediately.


The other way that this method can be used is as a way to synchronize with a non-System.ComponentModel.IBindingList data source. If the control is bound to a data source which implements System.ComponentModel.IBindingList then any modifications made to the data source will automatically propogate to the control. When the control is bound to a data source which does not implement System.ComponentModel.IBindingList (such as Array or ArrayList) there is no automated infrastructure for notifying the control of modifications to the data source. In that scenario this method can be used to synchronize the control's list of items with the new values in the data source.

Note: Calling this method on the UltraTimeZoneEditor or UltraFontNameEditor will result in a NotSupportedException since those controls do not support being bound.


If an external ValueList has already been assigned to the ValueList property and that ValueList does not support data binding (generally not a BindableValueList), an exception will be thrown when trying to bind the control. In this situation, the developer is responsible either for using a BindableValueList or to clear out the ValueList property so that the control will create a new one.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also