Watch, Follow, &
Connect with Us

ID: 29131, RADXE3 Demos - 27 - Using CustomFormat property in LiveBindings

by David Intersimone Email: Anonymous


This quick video shows you three ways to use an expression in the CustomFormat property of the TLinkPropertyToField component to bind two columns of a dataset to a UI control.
Download Details
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For RAD Studio, Version 17.0  to 17.0 147 downloads
Copyright: All rights reserved


Size: 26,356,920 bytes
Updated on Tue, 30 Oct 2012 16:16:16 GMT
Originally uploaded on Tue, 30 Oct 2012 16:16:06 GMT
SHA1 Hash: 6460CF384B02C98BC2C54EE101A238073380AA19
MD5 Hash: F21971080E0DA3AC598EE891E06D64E9

    Explore the files in this upload

Description
Using the LiveBindings Designer and LiveBindings Wizard in RAD Studio XE3 allows you to easily link fields to UI controls and do other common LiveBindings tasks. I wanted to bind two dataset column values (first and last name) into one TLabel in my Delphi and C++Builder demo applications. I asked Jim Tierney, team member here in Scotts Valley, how to do it with LiveBindings and he showed me three ways to use an expression in the CustomFormat property of the TLinkPropertyToField component. This quick video shows you how to use the LiveBindings Designer, LiveBindings Wizard and a custom expression.

In the video I use the sample InterBase XE3 Employee.gdb database which has a Customer table that includes the CONTACT_FIRST and CONTACT_LAST columns for the customer contact. Use one of the three following expressions in the CustomFormat property of XE3's new TLinkPropertyToField to bind an expression to one UI control:

A verbose version: Self.Owner.CONTACT_FIRST.Text+" "+Self.Owner.CONTACT_LAST.Text

A less verbose version: %s+" "+Owner.CONTACT_LAST.Text

Use this version if the field names are not valid identifiers: %s+" "+Owner.FieldByName('CONTACT_LAST').Text

Additonal information about the XE3 LiveBindings new TLinkPropertyToField component, the CustomFormat property, LiveBindings Designer and LiveBindings Wizard can be found at:

LiveBindings in RAD Studio XE3 - http://docwiki.embarcadero.com/RADStudio/XE3/en/LiveBindings_in_RAD_Studio

LiveBindings Designer - http://docwiki.embarcadero.com/RADStudio/XE3/en/LiveBindings_Designer

LiveBindings Wizard - http://docwiki.embarcadero.com/RADStudio/XE3/en/LiveBindings_Wizard

TLinkPropertyToField - http://docwiki.embarcadero.com/Libraries/XE3/en/Data.Bind.Components.TLinkPropertyToField

October 27 - Using binding expressions in the CustomFormat property of a TLinkPropertyToField component

Watch on YouTube: http://www.youtube.com/watch?v=86PPmORQ7kY

Duration: 4 minutes and 23 seconds

Size: 30.4mb

Format: MP4

Thank you Jim for your help showing me how to combine two dataset columns using LiveBindings.

For additional product information go to http://www.embarcadero.com/products/rad-studio

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Server Response from: ETNACDC02