ComponentOne List 8.0 for ActiveX
DataMode Property (TDBCombo)

 

TDBCombo Reference> TDBCombo Control Properties> DataMode Property (TDBCombo)

DataMode Property (TDBCombo)

Syntax

object.DataMode= value

Remarks

Read-only at run time. Read/Write at design time.

Property applies to TDBList and TDBCombo controls.

Values

Design Time

Run Time

0 - Bound (default)

dblBound

1 - Unbound

dblUnbound

2 - Unbound Extended

dblUnboundEx

3 - Application

dblUnboundAp

4 - Storage

dblUnboundSt

5 - AddItem

dblAddItem

When set to 0 - Bound, the control displays data available from its bound DataSource.

When set to 1 - Unbound, the control uses the original unbound events to retrieve and update displayed data. When this mode is used, the control fires the UnboundReadData event to fetch data. This setting was retained for backward compatibility earlier versions of True DBList. If you are writing a new application, please use mode 2, 3, or 4 instead.

When set to 2 - Unbound Extended, the control uses the UnboundReadDataEx event to fetch data. The UnboundReadDataEx event is more efficient and easier to use than the UnboundReadData event of mode 1. This is the recommended setting for using the list unbound with a database API that supports multiple-row fetches.

When set to 3 - Application, the control uses the ClassicRead event to fetch data one cell at a time. This mode is much easier to use than mode 2, particularly if data is being retrieved from a Visual Basic array. However, it can be less efficient than mode 2 if there are many columns because the control needs to fire more events in order to retrieve data.

When set to 4 - Storage, the control uses an XArrayDB object as a data source, and no unbound data retrieval or update events are fired. At run time, you create and populate an XArrayDB object just as you would a standard Visual Basic array, then bind it to a TDBList or TDBCombo control using the Array property. This is by far the simplest way to use the controls in unbound mode.

When set to 5- AddItem, the list portion of the control is populated with data via the AddItem method. The first item added starts at zero. Any event that uses a bookmark will use the zero based index of the control.

See Also

TDBList and TDBCombo Controls

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback