ComponentOne List 8.0 for ActiveX
Using True DBList with a Data control on a different form

Using the Data control's Recordset property, you can effectively bind True DBList or any other bound control on one form to a Data control on another form. Strictly speaking, you cannot directly bind a list to a Data control on another form. For example, assume you have a list on Form2 and you would like it to display data from the Recordset of Data1, which is on Form1. You need to first bind the list to a Data control (Data2) on Form2. Form2.Data2 is not connected to a database. Instead, the Recordset of Form2.Data2 is set to the Recordset of Form1.Data1:

Example Title
Copy Code
Form2.Data2.DatabaseName = Form1.Data1.DatabaseName

Set Form2.Data2.Recordset = Form1.Data1.Recordset

The list on Form2 will work as if it were directly bound to Form1.Data1. When you move or update records through Form1.Data1, the list on Form2 will respond accordingly. Conversely, if you move or update records in the list, all controls on Form1 that are bound to Form1.Data1 will respond.

 

 


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

Product Support Forum  |  Documentation Feedback