Bound Mode > Binding True DBGrid to a Data Source > Binding to an ICursor data source |
To associate a True DBGrid control (TDBG8.OCX) with a Visual Basic Data control, set the DataSource property of the grid to the name of a Data control on the same form. This is all that is required to make True DBGrid fully aware of the database in your application.
Once such a link exists, True DBGrid and the Data control automatically notify and respond to all operations performed by the other, simplifying your application development:
Once the grid has been associated with a Data control, you can retrieve the field layout of the database at design time and use the property pages to customize the appearance of the grid. For more information, see Design Time Interaction.
When you run your application, True DBGrid will automatically respond by displaying the contents of the Recordset defined by the Data control's RecordSource property. Data will be fully available at run time, and can be edited as well.
True DBGrid will automatically update its display to reflect any changes made to the Data control. However, True DBGrid waits until the system is idle before performing such display updates, since your program may need to perform other actions before the display is synchronized.
Note: The DataSource property cannot be set at run time, and can only be set at design time within the Visual Basic Properties window.