Delphi

Flexible Multi-Tenancy REST Support Demo For RAD Server In Delphi

It requires InterBase to be installed on the machine or to connect to a remote server. Make sure that the server is running before you run the sample application. With Multi-Tenancy support, a single RAD Server instance with a single RAD Server database connection can support multiple isolated tenants. Each tenant has a unique set of RAD Server resources including Users, Groups, Installations, Edge Modules, and other data. All tenants have custom resources that are installed in the EMS Server. Also, as an administrator you can create new tenants, edit existing ones, add, edit, or delete details of your tenants, specify if the tenant is active, and delete the tenants that you do not need. Location You can find the RAD Server Overview Multi-tenant sample project at: Start | Programs | Embarcadero RAD Studio Sydney | Samples and then navigate to the following: Object PascalDataBaseEMSMulti-Tenancy Demo Subversion Repository: You can find Delphi code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version. Overview This sample application demonstrates RAD Server’s Multi-Tenancy support. RAD Server Overview is a turn-key application foundation for rapidly building and deploying services based applications. RAD Server enables developers to quickly build new application back-ends or migrate existing Delphi or C++ client/server business logic to a modern services based architecture that is open, stateless, secure and scalable. A single RAD Server Overview instance with a single RAD Server database connection can support multiple isolated tenants. This demo uses a chain of toy stores to highlight RAD Server’s multi-tenancy support where each store with its employees and goods is a tenant implementation. Using the RAD Server Multi-Tenant Application The sample application demonstrates a retail store deployment use case. Each store with its employees and goods is a tenant implementation. Employees There are two groups of users with different rights: Managers can add new store items, delete them, and edit the details of the existing ones while cashiers can only view the information about the existing goods. Neither employee can see the information about the other stores in the chain.   Description Now, let us have a look at the sample application. Store Log in Page To access store specific information, enter the following information on the Store Log in page: Toy Store: select a store from the list. Each store is a tenant implementation. Store password: enter the password. Tip: You can find credentials in the Readme.txt file provided with the sample application. Employee Log in Page On the Employee Log in page, each employee enters the following: Employee login Employee password Tip: You can find credentials in the Readme.txt file provided with the sample application. Store Items Page After logging in, each employee sees the store items screen. The screen is displayed in two different modes: edit or view only, and access depends on the employee’s position. This uses EMS groups (a feature of RAD Server) to define access rights. Managers can view, add, and delete the store items and edit the details. Cashiers can view the items’ details only. Please follow the link to the original post for more information: http://docwiki.embarcadero.com/CodeExamples/Sydney/en/EMS.Sample_RAD_Server_Multi-Tenant_Application Check out the full source code for the Multi-Tenancy REST Demo over on GitHub.

Read More

Modernize Your Multi-Device Fire Monkey App Easy To Use Card View Wizard Layout Template

User experience is the key thing to be considered while building a modern Multi-Device application. Lots of layout templates were available in GetIt Package Manager to design responsive, ultra-modern, cross-platform FireMonkey applications. This post helps to understand one of the FireMonkey Layout templates the Card View Wizard. Card View Layout Template is a Fire Monkey template that incorporates a number of card view pages that can be navigated forward and backward though one would use this as an in-app tutorial. How to install: You can easily install this IDE Plugin from GetIt Package Manager. The steps are as follows. Navigate In RAD Studio IDE->Tools->GetIt Package Manager->select Sample Projects in Categories-> Card View Wizard 1.0 by Embercadero Technologies and click Install Button. Read the license and Click Agree All. An Information dialog saying ‘Requires a restart of RAD studio at the end of the process. Do you want to proceed? Click yes and continue. It will download the plugin and installs it. Once installed Click Restart now. GetIt – Card View Wizard 1.0 Card View Wizard Sample App Implementation Details: Car View Wizard Sample app contains, a TTabControl with a list of TabItems in it. Each TabItem is placed with an instance of TFrameCard defined in uCardFrame.pas. TFrameCard can set CardTitle, CardText, and Configure card with CardLayout Text image. procedure TMainForm.FormCreate(Sender: TObject); begin {$IFDEF FIRSTSET} // first set FrameCard1.SetCardTitle(WIZARD_TITLE_1); FrameCard1.SetCardText(WIZARD_TEXT_1); FrameCard1.ConfigureCard(TCardButton.Inner, TCardBGImage.Inner, TCardLayout.TextImage); FrameCard2.SetCardTitle(WIZARD_TITLE_2); FrameCard2.SetCardText(WIZARD_TEXT_2); FrameCard2.ConfigureCard(TCardButton.Inner, TCardBGImage.Inner, TCardLayout.TextImage); FrameCard3.SetCardTitle(WIZARD_TITLE_3); FrameCard3.SetCardText(WIZARD_TEXT_3); FrameCard3.ConfigureCard(TCardButton.Inner, TCardBGImage.Inner, TCardLayout.TextImage); FrameCard4.SetCardTitle(WIZARD_TITLE_4); FrameCard4.SetCardText(WIZARD_TEXT_4); FrameCard4.SetNextButtonText(WIZARD_NEXT_BUTTON_4); FrameCard4.ConfigureCard(TCardButton.Inner, TCardBGImage.Inner, TCardLayout.TextImage); {$ENDIF} WizardTabControlChange(Sender); end; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 procedure TMainForm.FormCreate(Sender: TObject); begin   {$IFDEF FIRSTSET}   // first set   FrameCard1.SetCardTitle(WIZARD_TITLE_1);   FrameCard1.SetCardText(WIZARD_TEXT_1);   FrameCard1.ConfigureCard(TCardButton.Inner, TCardBGImage.Inner, TCardLayout.TextImage);     FrameCard2.SetCardTitle(WIZARD_TITLE_2);   FrameCard2.SetCardText(WIZARD_TEXT_2);   FrameCard2.ConfigureCard(TCardButton.Inner, TCardBGImage.Inner, TCardLayout.TextImage);     FrameCard3.SetCardTitle(WIZARD_TITLE_3);   FrameCard3.SetCardText(WIZARD_TEXT_3);   FrameCard3.ConfigureCard(TCardButton.Inner, TCardBGImage.Inner, TCardLayout.TextImage);     FrameCard4.SetCardTitle(WIZARD_TITLE_4);   FrameCard4.SetCardText(WIZARD_TEXT_4);   FrameCard4.SetNextButtonText(WIZARD_NEXT_BUTTON_4);   FrameCard4.ConfigureCard(TCardButton.Inner, TCardBGImage.Inner, TCardLayout.TextImage); {$ENDIF}     WizardTabControlChange(Sender); end; When the WizardTabControlChange event occurs the respective card is displayed with title text and background image. procedure TMainForm.WizardTabControlChange(Sender: TObject); var I: Integer; begin for I := 0 to WizardTabControl.TabCount-1 do begin if TTabItem(WizardTabControl.Tabs[I]).TagObject is TRectangle then begin TButton(TTabItem(WizardTabControl.Tabs[I]).TagObject).Visible := False; end; end; if WizardTabControl.TabIndex>-1 then if WizardTabControl.ActiveTab.TagObject is TRectangle then begin TButton(WizardTabControl.ActiveTab.TagObject).Visible := True; end; end; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 procedure TMainForm.WizardTabControlChange(Sender: TObject); var I: Integer; begin   for I := 0 to WizardTabControl.TabCount–1 do     begin       if TTabItem(WizardTabControl.Tabs[I]).TagObject is TRectangle then         begin           TButton(TTabItem(WizardTabControl.Tabs[I]).TagObject).Visible := False;         end;     end;   if WizardTabControl.TabIndex>–1 then     if WizardTabControl.ActiveTab.TagObject is TRectangle then       begin         TButton(WizardTabControl.ActiveTab.TagObject).Visible := True;       end; end; Card View Wizard 1.0 Demo Be sure to check out all the available sample applications here!

Read More

Learn How To Use Range Types On A PostgreSQL Database In Windows Using FireDAC With Delphi

 FireDAC represents a range type column as a ftADT field with 3 subfields: lbound – lower range bound. hbound – upper range bound. flags – range flags. Note: Columns of range type are read-only. This sample updates them using SQL commands. To get range column attributes, this sample uses the following code: var l: Xxxx; // … l := FDQuery1.FieldByName(‘.‘).AsXxxx; var l: Xxxx; // … l := FDQuery1.FieldByName(‘.‘).AsXxxx; Location You can find the Ranges project at: Start | Programs | Embarcadero RAD Studio Sydney | Samples and then navigate to: Object PascalDatabaseFireDACSamplesDBMS SpecificPostgreSQLRanges 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 Navigate to the location given above and open PGRanges.dproj. Press F9 or choose Run > Run. Files File in Delphi Contains PGRanges.dprojPGRanges.dpr The project itself. fMain.pasfMain.fmx The main form. Implementation Before running the sample, the main components are configured at design time using the Object Inspector as follows: A TFDConnection object named FDConnection1. This is the FireDAC connection object that the sample uses to connect to a DBMS. The sample sets the ConnectionDefName property to PG_Demo. Note: You can change the ConnectionDefName property to connect to a different PostgreSQL server using a valid user name and password. A TFDQuery object named FDQuery1. This component implements a dataset capable of executing SQL queries. The sample sets: The Connection property to FDConnection1 in order to specify the FireDAC connection object. The SQL property with the following SQL SELECT statements that define different integer ranges: SELECT int4range(null,2000, ‘(]’) rng UNION ALL SELECT int4range(3000,4000, ‘[)’) rng UNION ALL SELECT int4range(5000,6000, ‘[]’) rng UNION ALL SELECT int4range(7000,null, ‘()’) rng UNION ALL SELECT int4range(20,20, ‘()’) rng SELECT int4range(null,2000, ‘(]’) rng UNION ALL SELECT int4range(3000,4000, ‘[)’) rng UNION ALL SELECT int4range(5000,6000, ‘[]’) rng UNION ALL SELECT int4range(7000,null, ‘()’) rng UNION ALL SELECT int4range(20,20, ‘()’) rng Notes: The parentheses or brackets of the third argument indicate whether the lower and upper bounds are exclusive or inclusive. “[” represents an inclusive lower bound while “(” represents an exclusive lower bound. The same way, “]” represents an inclusive upper bound while “)” represents an exclusive upper bound. If you omit the lower bound of a range, it means that all points less than the upper bound are included in the range. Likewise, if you omit the upper bound of the range, then all points greater than the lower bound are included in the range. If both lower and upper bounds are omitted, all values of the element type are considered to be in the range. A TDataSource object named DataSource1. This component provides an interface between a dataset component and data-aware controls on a form. In this sample, it is used to provide communication between the dataset and the grid where the dataset is displayed. To this end, the sample sets the following properties: The DataSet property of DataSource is set to FDQuery1. The DataSource property of DBGrid1 is set to DataSource1. When you run the application, you see: A TDBGrid that is used to display the different data ranges defined on the SQL command. Three TDBEdit components that are used to display the lbound,lbound and flags fields of the range type. Two TLabel components that are used to display the type of the range bounds. You can check the link below for more details about this sample: http://docwiki.embarcadero.com/CodeExamples/Sydney/en/FireDAC.PostgreSQL_Ranges_Sample Head over and check out the full source code for the PostgreSQL Ranges sample for Windows apps on GitHub or in your RAD Studio IDE samples section.

Read More

Quickly Build Enterprise-Grade Multi-Tier Solutions Using DataSnap In Delphi And C++

Al Mannarino walks you through how to build a DataSnap solutions project using the DataSnap Setup Wizard. Overview Wizards in the DataSnap Server category DataSnap WebBroker Application Wizard Main components and units Implement the DataSnap server functionality DataSnap Clients DataSnap Use Cases Mainly Delphi and C++ Builder developers utilize 3 major backend technologies: WebBroker – Web Server Application DataSnap – REST Backends RAD Server (EMS) – Most powerful services-based applications When to use DataSnap? A small number of concurrent clients Supports authentication and authorization Support for communication filters Compression and Encryption filters included Callback functionality – Servers can notify selected or all connected client applications by sending information to the callback channels that something interesting happened on the server FireDAC JSON reflection framework – This simplifies building client-server database applications.  If you want to learn how to use DataSnap in your projects, be sure to check out the full, Unleash The Power of Delphi with Delphi Labs DataSnap Series! Take a look at the fixes available in the RAD Studio 10.4 release for DataSnap. Looking for a REST based solution? Try RAD Server!

Read More

Learn About How To Redirect Inserting, Deleting And Updating Records In Delphi With FireDAC

This sample shows how to redirect inserting, deleting and updating records using standalone table adapter. Location You can find the Commands sample project at: Start | Programs | Embarcadero RAD Studio Sydney | Samples and then navigate to: Object PascalDatabaseFireDACSamplesDApt LayerCommands Subversion Repository: You can find Delphi code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version. Files File in Delphi Contains Commands.dprojCommands.dpr The project itself. fCommands.pasfCommands.fmx The main form. Implementation The sample implements the following standalone table adapter features. Create table adapter var oAdapt: IFDDAptTableAdapter; begin // create table adapter FDCreateInterface(IFDDAptTableAdapter, oAdapt);   var     oAdapt: IFDDAptTableAdapter;   begin     // create table adapter     FDCreateInterface(IFDDAptTableAdapter, oAdapt); Selecting data with oAdapt do begin FConnIntf.CreateCommand(oComm); SelectCommand := oComm; SelectCommand.Prepare(‘select * from {id FDQA_map1}’); Define; Fetch; //…   with oAdapt do begin     FConnIntf.CreateCommand(oComm);     SelectCommand := oComm;     SelectCommand.Prepare(‘select * from {id FDQA_map1}’);     Define;     Fetch;   //… Redirect records Redirect all record inserts into FDQA_map2 table instead FDQA_map1: FConnIntf.CreateCommand(oComm); InsertCommand := oComm; InsertCommand.CommandText := ‘insert into {id FDQA_map2}(id2, name2) values(:NEW_id1, :NEW_name1)’;   FConnIntf.CreateCommand(oComm);     InsertCommand := oComm;     InsertCommand.CommandText := ‘insert into {id FDQA_map2}(id2, name2) values(:NEW_id1, :NEW_name1)’; Redirect all record deletes into FDQA_map3 table instead FDQA_map1: FConnIntf.CreateCommand(oComm); DeleteCommand := oComm; DeleteCommand.CommandText := ‘delete from {id FDQA_map3} where id3 = :OLD_id1’;     FConnIntf.CreateCommand(oComm);     DeleteCommand := oComm;     DeleteCommand.CommandText := ‘delete from {id FDQA_map3} where id3 = :OLD_id1’; Redirect all record updates into FDQA_map4 table instead FDQA_map1: FConnIntf.CreateCommand(oComm); UpdateCommand := oComm; UpdateCommand.CommandText := ‘update {id FDQA_map4} set id4 = :NEW_id1, name4 = :NEW_name1 where id4 = :OLD_id1’;   FConnIntf.CreateCommand(oComm);     UpdateCommand := oComm;     UpdateCommand.CommandText := ‘update {id FDQA_map4} set id4 = :NEW_id1, name4 = :NEW_name1 where id4 = :OLD_id1’; Add new rows for i := 0 to 4 do DatSTable.Rows.Add([i, ‘string’ + IntToStr(i)]);   for i := 0 to 4 do       DatSTable.Rows.Add([i, ‘string’ + IntToStr(i)]); Post changes to RDBMS For more details and links to other posts, you can refer to the link below: http://docwiki.embarcadero.com/CodeExamples/Sydney/en/FireDAC.DAptLayerCommands_Sample Check out the full source code for the demo over on GitHub or in your RAD Studio IDE examples section.

Read More

Popular Enterprise Grade Password Identity Manager Powers 70,000+ Businesses And Is Built In Delphi

1Password is a premier password and identity manager that runs in millions of desktops and mobile devices worldwide and it is built in Delphi. According to their site in addition to personal and family options it also powers the enterprise with more than 70,000 businesses trusting 1Password to secure their business and protect their data. Stefan van As and Mark Eaton from AgileBits provided some information on the third party components that they make use of in the 1Password for Windows version. It really is amazing all of the different components that they make use of from the massive third party component ecosystem available to all Delphi developers. The Delphi developer ecosystem is one of the key things that makes it such a powerful development tool. Here is an overview of the 3rd party components used in 1Password: Browser Helper Objects (BHOs) — this is what powers 1Password inside Internet Explorer, Bonjour — this is what powers Wi-Fi Sync (here is an unrelated Delphi implementation), ChilkatCrypt — this is what powers some of our crypto, MS Crypto — this is the Pseudo Random Number Generator (PRNG), DISQLite — Some of 1Password’s features – such as Watchtower, for example – are utilizing SQLite. Because 1Password 4 is in Delphi 2007, we use DISQLite for that (today, it would be using FireDAC for that), dxgettext — this is used to localize 1Password. It works nicely with Crowdin, a localization project management platform, GraphicEx and Graphics32 — this gives (alpha channel) transparency, HyperString — super fast string handling routines. (no longer available), OpenSSL — this is what powers PBKDF2 (among other crypto routines), sgcWebSockets — The WebSockets are used with the Chrome and Firefox browser extensions, StreamSec — another crypto library, mostly for SSL/TLS, and zlib and LibTar — For OS X-compatible compression routines. Additionally they use EurekaLog — For diagnostics reporting, FinalBuilder — For build management, and Inno Setup — The installation wizard. Website https://1password.com/ Screenshot Gallery

Read More

Learn How To Send Arrays To A PostgreSQL Database Server Using FireDAC In Delphi On Windows

Location You can find the Arrays project at: Start | Programs | Embarcadero RAD Studio Sydney | Samples and then navigate to: Object PascalDatabaseFireDACSamplesDBMS SpecificPostgreSQLArrays 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 Navigate to the location given above and open PGArrays.dproj. Press F9 or choose Run > Run. Files File in Delphi Contains PGArrays.dprojPGArrays.dpr The project itself. fMain.pasfMain.fmx The main form. Implementation Before running the sample, the main components are configured at design time using the Object Inspector as follows: A TFDConnection object named FDConnection1. This is the FireDAC connection object that the sample uses to connect to a DBMS. The sample sets the ConnectionDefName property to PG_Demo. A TFDQuery object named FDQuery1. This component implements a dataset capable of executing SQL queries. The sample sets its Connection property to FDConnection1 to specify the FireDAC connection object. A TDataSource object named DataSource1. This component provides an interface between a dataset component and data-aware controls on a form. In this sample, it is used to provide communication between the dataset and the grid where the dataset is displayed. To this end, the sample sets the following properties: The DataSet property of DataSource is set to FDQuery1. The DataSource property of DBGrid1 is set to DataSource1. When you run the application, you see a grid, a combo box and two buttons labeled as PG Read and PG Write. The purpose of these components in this sample is the following: TDBGrid – This sample uses the grid to display the arrays. TComboBox – Use the combo box to choose whether to define the array as ftArray or ftDataSet. TButtons – Both buttons have an OnClick event to do the following:Uses the Open method to read the arrays from the database server. The sample displays the arrays on the grid.Press this button to send arrays to a database server. When you press this button, the sample takes the following steps: Uses the Text property of SQL to set the SQL command that FDQuery1 will execute. Sets the TFDParam.DataTypeName to specify the field name as .. Sets the TFDParam.ArrayType property to atTable.Note: If you set it to atArray it does not work. Sets the array size with the TFDParam.ArraySize property. Sets the arrays using the AsStrings property: Sends the arrays to the database server by executing the SQL command specified in the first step. For more information you can refer to the link below: http://docwiki.embarcadero.com/CodeExamples/Sydney/en/FireDAC.PostgreSQL_Arrays_Sample Check out the demo source code for PostgreSQL Arrays in Windows apps here.

Read More

Powerful Media Player Software Downloaded 19+ Million Times Built In Delphi

ALLPlayer is a powerful media player software that will literally will play almost all the media and formats that you encounter in any given day and it is built in Delphi. According to ALLPlayer it has had over 19 MILLION downloads. It can handle 3G2, AVI, MKV, AVI, FLV, DAT, MOV, M2TS, MP4, 3GP, VOB, MPG, APE, AU, MKA, MP3, OGG, WAV and AC3 formats, as well as DVDs, audio CDs, animated GIFs and any link that you specify. The primary features of ALLPlayer include supporting the vast majority of video and audio media and formats AND automatically searches and downloads matching subtitles for your media files. A companion app also built in Delphi is the ALLMediaServer which allows you to watch movies, listen to music or view photos from your computer on your TV, smartphone or other device compatible with Samsung AllShare DLNA. Website https://www.allplayer.org/ Screenshot Gallery

Read More

TFDBatchMove Is A Powerful Way To Move Data Between Text Files And Tables Using Datasets In Delphi

Location You can find the TFDBatchMove sample project at: Start | Programs | Embarcadero RAD Studio Sydney | Samples and then navigate to: Object PascalDataBaseFireDACSamplesComp LayerTFDBatchMoveMain. How to Use the Sample Navigate to the location given above and open: Press F9 or choose Run > Run. Select one of the following connections from the Use Connection Definition drop-down menu: Access_Demo, Access_Demo_Pooled, SQLite_Demo or SQLite_Demo_Pooled. Click the three buttons to fully test the component behaviour: Click 1. Move text to table to load the data from the Data.txt file into a table. Click 2. Move table to table to move the dataset from one table to a different one. Click 3. Move table to text to move the table content to an output file DataOut.txt. Implementation 1. Move text to table button: This button loads the content from a txt file located at Start | Programs | Embarcadero RAD Studio Sydney | SamplesObject PascalDataBaseFireDACSamplesComp LayerTFDBatchMoveMaindata.txt into a table from the selected DBMS. The sample adds the FireDAC.Comp.BatchMove.Text unit to the interface uses section to allow the creation of a text reader TFDBatchMoveTextReader and a dataset writer TFDBatchMoveDataSetWriter. Sets the FileName property of TFDBatchMoveTextReader with the location of data.txt. This is the file used to load the data to the table. Also several DataDef properties are adjusted according to the text file format. DataDef.Separator := ‘,’; It defines the separator used to separate the fields in the text file. DataDef.WithFieldNames := True; It specifies that the field name is included in the first row of the text file. Uses the Dataset property of TFDBatchMoveDataSetWriter to set the destination dataset. Also Optimise property is set to False to allow the dataset content to be visualized using TDBGrid. The GuessFormat method is called before loading the data to automatically recognize the text file structure. Then the demo executes the TFDBatchMove component and shows the loaded data using a query in the TDBGrid. 2. Move table to table button: This button moves the data between two different tables on the same DBMS. The sample creates a TFDBatchMoveDataSetReader dataset reader and a TFDBatchMoveDataSetWriter dataset writer. Uses the Dataset property of TFDBatchMoveDataSetReader to set the source dataset, qryLoaded. Uses the Dataset property of TFDBatchMoveDataSetWriter to set the destination dataset, qryMoved. It executes the TFDBatchMove component and shows the query of both datasets on the TDBGrid. 3. Move table to text button: This button copies the data from the table source to an output file located at the application’s path. It creates the destination file: DataOut.txt. The sample creates a TFDBatchMoveDataSetReader dataset reader and a TFDBatchMoveTextWriter text writer. Uses the Dataset property of TFDBatchMoveDataSetReader to set the source dataset, qryLoaded. Sets the FileName property of TFDBatchMoveTextWriter to set the output file name and path: Start | Programs | Embarcadero RAD Studio Sydney | SamplesObject PascalDataBaseFireDACSamplesComp LayerTFDBatchMoveMainDataOut.txt. It executes the TFDBatchMove component to create the file and save the data to the output file. You can refer to the link below for more details about this sample: http://docwiki.embarcadero.com/CodeExamples/Sydney/en/FireDAC.TFDBatchMove_Sample Check out the full source code for the TFDBatchMove demo over on GitHub!

Read More

Powerful Cross Platform TeeGrid Is Capable Of Handling A Large Number Of Cells In Delphi FireMonkey

TeeGrid is a full featured third party grid and tabular control for Delphi and C++. Supporting both VCL and FireMonkey it should run on Windows 32 and 64 bit, Mac OSX, Android and iOS. According to the developer it is “Written from scratch (not derived from TCustomGrid or TGrid), aprox 10K lines of code and 100K compiled size. Free for non-commercial use (in binary format).” It claims the only limit is the memory used by your own data, (compile for the 64bit platform for more than 2GB/3GB). Additionally it says that you can use it’s TVirtualModeData class to automatically create columns and provide cell values using OnGet and OnSet events. TeeGrid can be used like a TStringGrid using a TStringsData object: var Data : TStringsData; Data:= TStringsData.Create; // Initialize size Data.Columns:= 2; Data.Rows:= 6; // Set header texts Data.Headers[0]:= ‘A’; Data.Headers[1]:= ‘B’; // Fill rows and cells Data[0,0]:= ‘A0’; Data[1,0]:= ‘B0’; // Set data to grid TeeGrid1.Data:= Data; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 var Data : TStringsData; Data:= TStringsData.Create;   // Initialize size Data.Columns:= 2; Data.Rows:= 6;   // Set header texts Data.Headers[0]:= ‘A’; Data.Headers[1]:= ‘B’;   // Fill rows and cells Data[0,0]:= ‘A0’; Data[1,0]:= ‘B0’;   // Set data to grid TeeGrid1.Data:= Data; Sub-columns (any column can have children columns) TeeGrid1.Columns.AddColumn(‘My Column 1’).Items.AddColumn(‘Sub-Column 1’)… TeeGrid1.Columns.AddColumn(‘My Column 1’).Items.AddColumn(‘Sub-Column 1’)… Per-column formatting (font, back fill, stroke, text alignment, margins) TeeGrid1.Columns[3].ParentFormat:= False; TeeGrid1.Columns[3].Format.Font.Size:= 14; TeeGrid1.Columns[3].TextAlignment:= TColumnTextAlign.Custom; TeeGrid1.Columns[3].TextAlign:= TTextAlign.Center; // or Left or Right TeeGrid1.Columns[3].ParentFormat:= False; TeeGrid1.Columns[3].Format.Font.Size:= 14;   TeeGrid1.Columns[3].TextAlignment:= TColumnTextAlign.Custom; TeeGrid1.Columns[3].TextAlign:= TTextAlign.Center; // or Left or Right Per-cell custom paint using the column OnPaint event Lock columns to left or right grid edges To see the rest of the cells options, go to the next link and download the package: https://github.com/Steema/TeeGrid

Read More