Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
CodeDatabaseDelphiRAD Studio

Quickly Learn How Easy It Is To Bind DataSets To Visual Controls In Delphi With LiveBindings

This Sample Uses LiveBindings To Bind A TBindNavigator With Other Controls

Location

You can find the BindLinkFMX sample project at:

  • Start | Programs | Embarcadero RAD Studio Sydney | Samples and then navigate to
    Object PascalLiveBindingsbindlinkfmx
  • Subversion Repository:
    • You can find Delphi code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version.

How to Use the Sample

  1. Navigate to Start | Programs | Embarcadero RAD Studio Sydney | Samples, go to Object PascalLiveBindingsbindlinkfmx and open BindLinkFMXProject.dproj.
  2. Press F9 or choose Run > Run.
  3. 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.
  4. Use the TBindNavigator to navigate through the dataset.
  5. See how the rest of the visual components update when navigating through the dataset.
  6. Choose View > LiveBindings Designer to open the LiveBindings Designer and view the data binding connections.

Files

FileContains
BindLinkFMXProjectThe project itself.
FormUnit1The main form where the components are located.
Readme.htmlBasic information about this sample.

Implementation

  • Use the BindNavigator1 TBindNavigator to navigate through the dataset.
  • TBindingsList is used to create managed binding among the different components. TBindLink is used to create bindings to the columns of the dataset.
  • The ImageWithHandler TImageControl displays the Graphic Field of the selected fish within the dataset.
  • The EditWithHandler TEdit displays the Category Field of the selected fish within the dataset.
  • The ListBoxWithHandler TListBox displays the different Categories of the dataset.
  • The MemoWithHandler TMemo displays the Notes of the selected fish.
  • The LabelFields TLabel displays the Category and Species Name of the selected fish. The LabelPosition TLabel displays the position of the selected fish within the dataset.

Please refer to the next link below if you want to see the original post of this sample:

http://docwiki.embarcadero.com/CodeExamples/Sydney/en/LiveBindings.BindLinkFMX_Sample

Head over and check out the full source code for the BindLink example in Embarcadero’s GitHub repository.


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES