ComponentOne List 8.0 for ActiveX
Populating the List

The following properties are used to populate a TDBList control and the list portion of a TDBCombo control:

DataMode

Specifies bound or unbound mode

RowSource

Specifies source of control data

Note that the DataMode setting specifies the data access mode for RowSource, not DataSource. This differs from other bound controls such as DBGrid, which use the DataSource property to populate the control.

In True DBList, the DataSource property specifies the data source that will be updated when the user selects an item in a TDBList or TDBCombo control.  The next section describes how to set up a list or combo control to update another data source automatically.

If you specify a valid RowSource, the list will be filled with data from the associated Recordset (Data control).The list will not track current record movement within this Recordset (Data control), nor will it notify the Recordset (Data control) when the user selects a different item in the list.

Unlike the DBList and DBCombo controls of Visual Basic, which can only display a single column of data (as specified by the ListField property), the TDBList and TDBCombo controls support multiple columns, which can be derived automatically from the underlying RowSource. For more information, see Choosing a Column Layout.

If you do not specify a valid RowSource, the list will not display any data, even if you specify a valid DataSource.

If the DataMode property is not set to its default value of 0 - Bound, then the RowSource property is not used and the control obtains data from unbound events or an XArrayDB object, depending upon the DataMode value.  For more information on these other data modes, see Specifying a Data Source.

 

 


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

Product Support Forum  |  Documentation Feedback