LiveBindings.BindGridLinkVCL Sample
This sample project demonstrates the use of a TBindGridLink.
Contents
Location
You can find the BindGridLinkVCL sample project at:
- Start | Programs | Embarcadero RAD Studio Athens | Samples and then navigate to Object Pascal\LiveBindings\bindgridlink\vcl
- Subversion Repository: https://github.com/Embarcadero/RADStudio12Demos/Object%20Pascal/LiveBindings/bindgridlink/vcl
Description
This sample demonstrates the use of a TBindGridLink.
This sample uses LiveBindings to bind a TDBNavigator with a TStringGrid and other controls.
How to Use the Sample
- Navigate to Start | Programs | Embarcadero RAD Studio Athens | Samples, go to Object Pascal\LiveBindings\bindgridlink\vcl, and open BindGridLinkVCLProject.dproj.
- Press F9 or choose Run > Run.
- When you run the application, the main window displays the visual components of the sample. Initially, the components display the first item of the dataset.
- Use the TStringGrid to navigate through the dataset.
- Ensure the Active TCheckBox is checked to navigate through the dataset also using the TDBNavigator.
- See how the rest of the visual components update when navigating through the dataset.
Files
File | Contains |
---|---|
BindGridLinkVCLProject |
The project itself. |
GridLinkFormUnit1 |
The main form where the components are located. |
Readme.html |
Basic information about this sample. |
Implementation
- Use the TDBNavigator or the TStringGrid to navigate through the dataset. Ensure the Active TCheckBox is checked to navigate through the dataset using the TDBNavigator.
- TBindingsList is used to create managed binding among the different components.
- The TImage displays the image of the selected fish.
- The two TEdit and the TLabel display the Category of the selected fish within the dataset.
- TBindGridLink is used to bind the TStingGrid and the TBindSourceDB.