Our Embarcadero technology partner, CData, has a wide range of tutorials in their support knowledge base that show Delphi and C++Builder developers how to integrate enterprise application data into your projects. Technical articles are included that show how to use the CData ODBC drivers with the FireDAC ODBC data source in your Delphi and C++ applications to bind data from Salesforce, Biztalk, SAP, Facebook, Netsuite, SugarCRM, Google Analytics, Quickbooks, and more. You will find a comple...
In the previous post, TListBindSourceAdapter<TContact> is used to enable a list of Delphi TContact objects with LiveBindings, using the CreateAdapter event handler:
implementation
{$R *.dfm}
uses ContactsUnit, System.Generics.Collections;
procedure TForm1.AdapterBindSource1CreateAdapter(Sender: TObject;
var ABindSourceAdapter: TBindSourceAdapter);
begin
ABindSourceAdapter := TListBindSourceAdapter<TContact>.Create(Self,
LoadContacts);
end;
C++ custom object ca...
The adapter components TListBindSourceAdapter and TObjectBindSourceAdapter enable LiveBindings with user defined TObjects.
Here is a user defined TObject for example.
type
TContact = class
private
FFirstName: string;
FLastName: string;
public
constructor Create; overload;
constructor Create(const AFirstName, ALastName: string); overload;
property FirstName: string read FFirstName write FFirstName;
property LastName: string read FLastName write FLastNam...
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 VCL and FireMonkey 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 TLinkPropertyToFi...
Here is a summary of the samples which accompany my XE3 VLB posts. The samples are grouped by Sourceforge locations.
Observers (post)
VclSampleObservableControls.dpk - Implements an observable TTrackBar
LinkTrackbarToField.dpr - TObservableTrackBar project
Actions (post)
Navigate using actions and TSpeedButton
Vcl\LiveBindingsActionsProtoProject.dpr
Fmx\FmxLiveBindingsActionsProtoProject.dpr
Vcl\LiveBindingsActionCDSProject.dpr
Fmx\FmxLiveBindingsActionsCDSProject....
In previous RAD Studio XE3 videos, I used LiveBindings, the LiveBindings Designer and the LiveBindings Wizard in several of the demo applications. In this short video, I'll focus on the LiveBindings Wizard and the 5 common binding tasks that it provides using multi-page wizards. The LiveBindings Wizard can be used with Delphi and C++Builder VCL and FireMonkey applications. The LiveBindings Wizard tasks include:
Link a Control with a Field
Link a Grid with a Data Source
Link a Componen...
A previous post uses TListBox to demonstrate how to link fields to a list control. The same steps can be used to link fields to TListView.
Here is a sample form with a TListView:
To improve the TListView appearance, the ListView1.ViewStyle property has been set to vsList.
The LiveBindings designer looks like this:
A project containing this form can be downloaded here. See SimpleListView.dpr.
The LiveBindings designer also supports TListView columns. Follow these steps t...
A lookup control displays a value that is different from the actual field value.
In this post, I modify the sample application built in the previous post about lookup lists.
The lookup list example ended with this design:
The lookup list ended with this form:
To demonstrate a lookup control, this form is changed so that the TLabeledEdit displays a color name instead of a color number. For example, "DarkGreen" is displayed instead of "25600".
To accomplish this, a "Looku...
A lookup list is used when the actual data values are not meaningful to users. A lookup list populates a list control with display values, instead of actual data values.
We can configure two TPrototypeBindSource components to represent a situation that calls for a lookup list. These steps differ from the previous post by using a Colors field in addition to a ColorsName field. The Colors field holds a numeric color value.
First, create the "DataSource".
New VCL application
Drop a TProto...
List controls can be linked to data source fields. TListBox, TComboBox and VCL TListView are examples of list controls. When a list control is linked to a data source field, the selected item in the list control corresponds to the value of the data source field. To change the value of the field, the user selects a different item in the list control.
Typically, two data sources are used with a list control. One data source provides the value to select in the list control. The other dat...