Skip to content

Commit 3a5446b

Browse files
committed
Example code to customize the sub-grid cosmetics
1 parent 40d6a28 commit 3a5446b

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

demos/FireMonkey/Database/Master_Detail_FireDAC/Customer_Orders.dfm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ object SampleData: TSampleData
44
Width = 267
55
object Sqlite_demoConnection: TFDConnection
66
Params.Strings = (
7+
8+
'Database=C:\Users\Public\Documents\Embarcadero\Studio\23.0\Sampl' +
9+
'es\data\FDDemo.sdb'
710
'ConnectionDef=SQLite_Demo')
811
LoginPrompt = False
912
Left = 111

demos/FireMonkey/Database/Master_Detail_FireDAC/Master_Detail_FireDAC.pas

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ procedure TMasterDetail.DetailNewGroup(const Sender,NewGroup:TRowGroup);
129129

130130
// Add a Totals header:
131131
TTotalsHeader.CreateTotals(NewGroup.Footer,tmpTot);
132+
133+
// Cosmetics on the sub-grid
134+
NewGroup.Rows.Back.Brush.Color:=TAlphaColors.Bisque;
135+
NewGroup.Rows.Back.Brush.Visible:=True;
136+
137+
NewGroup.Cells.Format.Font.Color:=TAlphaColors.Darkblue;
132138
end;
133139

134140
// Called when a new sub-grid has been created, to obtain the sub-grid Data

0 commit comments

Comments
 (0)