diff --git a/demos/FireMonkey/TeeGridFeatures/Views/Database/Master_Detail_FireDAC/Customer_Orders.dfm b/demos/FireMonkey/TeeGridFeatures/Views/Database/Master_Detail_FireDAC/Customer_Orders.dfm index 222f3de..bf89498 100644 --- a/demos/FireMonkey/TeeGridFeatures/Views/Database/Master_Detail_FireDAC/Customer_Orders.dfm +++ b/demos/FireMonkey/TeeGridFeatures/Views/Database/Master_Detail_FireDAC/Customer_Orders.dfm @@ -1,15 +1,13 @@ object SampleData: TSampleData - OldCreateOrder = False Height = 337 Width = 267 object Sqlite_demoConnection: TFDConnection Params.Strings = ( 'Database=D:\apps\Embarcadero\Studio\19.0\Samples\Data\FDDemo.sdb' 'ConnectionDef=SQLite_Demo') - Connected = True LoginPrompt = False - Left = 47 - Top = 22 + Left = 103 + Top = 38 end object CustomersTable: TFDQuery Connection = Sqlite_demoConnection @@ -17,19 +15,18 @@ object SampleData: TSampleData FetchOptions.RecordCountMode = cmTotal SQL.Strings = ( 'SELECT * FROM Customers') - Left = 47 - Top = 85 + Left = 103 + Top = 101 end object OrdersTable: TFDQuery - Active = True Connection = Sqlite_demoConnection FetchOptions.AssignedValues = [evRecordCountMode] FetchOptions.RecordCountMode = cmTotal SQL.Strings = ( 'SELECT * FROM Orders' 'where CustomerID = :Cust') - Left = 49 - Top = 147 + Left = 105 + Top = 163 ParamData = < item Name = 'CUST' @@ -39,7 +36,7 @@ object SampleData: TSampleData end> end object FDStanStorageBinLink1: TFDStanStorageBinLink - Left = 48 - Top = 208 + Left = 104 + Top = 224 end end diff --git a/demos/FireMonkey/TeeGridFeatures/Views/Database/Master_Detail_FireDAC/Customer_Orders.pas b/demos/FireMonkey/TeeGridFeatures/Views/Database/Master_Detail_FireDAC/Customer_Orders.pas index d5f653e..8f577a7 100644 --- a/demos/FireMonkey/TeeGridFeatures/Views/Database/Master_Detail_FireDAC/Customer_Orders.pas +++ b/demos/FireMonkey/TeeGridFeatures/Views/Database/Master_Detail_FireDAC/Customer_Orders.pas @@ -8,7 +8,8 @@ interface FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.Phys.SQLite, FireDAC.Phys.SQLiteDef, FireDAC.Stan.ExprFuncs, FireDAC.FMXUI.Wait, FireDAC.Stan.Param, FireDAC.DatS, FireDAC.DApt.Intf, FireDAC.DApt, - FireDAC.Stan.StorageBin, Data.DB, FireDAC.Comp.DataSet, FireDAC.Comp.Client; + FireDAC.Stan.StorageBin, Data.DB, FireDAC.Comp.DataSet, FireDAC.Comp.Client, + FireDAC.Phys.SQLiteWrapper.Stat; type TSampleData = class(TDataModule) diff --git a/demos/FireMonkey/TeeGridFeatures/Views/Database/Master_Detail_FireDAC/Master_Detail_FireDAC.fmx b/demos/FireMonkey/TeeGridFeatures/Views/Database/Master_Detail_FireDAC/Master_Detail_FireDAC.fmx index 28de6b2..a0039bb 100644 --- a/demos/FireMonkey/TeeGridFeatures/Views/Database/Master_Detail_FireDAC/Master_Detail_FireDAC.fmx +++ b/demos/FireMonkey/TeeGridFeatures/Views/Database/Master_Detail_FireDAC/Master_Detail_FireDAC.fmx @@ -46,51 +46,62 @@ object MasterDetail: TMasterDetail object TeeGrid1: TTeeGrid Columns = < item + LoadOrder = 0 Header.Text = 'CustomerID' Link = 'CustomerID' end item + LoadOrder = 1 Header.Text = 'CompanyName' Link = 'CompanyName' end item + LoadOrder = 2 Header.Text = 'ContactName' Link = 'ContactName' end item + LoadOrder = 3 Header.Text = 'ContactTitle' Link = 'ContactTitle' end item + LoadOrder = 4 Header.Text = 'Address' Link = 'Address' end item + LoadOrder = 5 Header.Text = 'City' Link = 'City' end item + LoadOrder = 6 Header.Text = 'Region' Link = 'Region' end item + LoadOrder = 7 Header.Text = 'PostalCode' Link = 'PostalCode' end item + LoadOrder = 8 Header.Text = 'Country' Link = 'Country' end item + LoadOrder = 9 Header.Text = 'Phone' Link = 'Phone' end item + LoadOrder = 10 Header.Text = 'Fax' Link = 'Fax' end> DataSource = DataSource1 - ReadOnly = False + CellFormat = <> Align = Client Size.Width = 817.000000000000000000 Size.Height = 554.000000000000000000 diff --git a/demos/FireMonkey/TeeGridFeatures/Views/Database/Master_Detail_FireDAC/Master_Detail_FireDAC.pas b/demos/FireMonkey/TeeGridFeatures/Views/Database/Master_Detail_FireDAC/Master_Detail_FireDAC.pas index b7e1940..5e1e0c0 100644 --- a/demos/FireMonkey/TeeGridFeatures/Views/Database/Master_Detail_FireDAC/Master_Detail_FireDAC.pas +++ b/demos/FireMonkey/TeeGridFeatures/Views/Database/Master_Detail_FireDAC/Master_Detail_FireDAC.pas @@ -82,7 +82,9 @@ procedure TMasterDetail.CBEnabledChange(Sender: TObject); Expander.AlwaysExpand:=True; // Set to first Column - TeeGrid1.Columns[0].Render:=Expander; + + if TeeGrid1.Columns.Count>0 then + TeeGrid1.Columns[0].Render:=Expander; end else begin