Version

SetInitialValue Method

This method is used to delay loading of the data source until it's dropped down.
Syntax
'Declaration
 
Public Sub SetInitialValue( _
   ByVal dataValue As Object, _
   ByVal displayText As String _
) 
public void SetInitialValue( 
   object dataValue,
   string displayText
)

Parameters

dataValue
Initial data value of the control.
displayText
Initial display text of the control.
Remarks

By default the datasource is loaded as soon as the control initialization process finishes. You can delay loading the datasource by calling this method and specifying non-null data value and display text (they can be empty strings). However note that you must set the data source after calling this method. Otherwise the datasource will be loaded syncrhonously when it's set or when the control initialization process finishes.

Here is a typical way to use this method. At design time either leave the UltraCombo's DataSource null or bind it to a dummy datasource for the purposes of designing columns. At runtime in the form's load event handler (or some other appropriate place) call this method specifying the initial data value and display text. Then bind the UltraCombo to the actual data source. This will cause the UltraCombo to not load the data source until it's dropped down or its Value property is set to a value that's not the initial data value specified in this method.

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