Hello I am a fresh user of TAdvStringGrid.
I have played a bit with the grid and loaded approx. 5000 records with 20 columns.
After loading the file in the grid I tried to group the grid at three levels by using this code:
AdvStringGrid1.MoveColumn(6,1); // Move “Category” as first
column
AdvStringGrid1.MoveColumn(5,2); // Move “SubCategory” as second
column
AdvStringGrid1.MoveColumn(5,3); // Move “Date” as third column
AdvStringGrid1.Group(1);
// Group on “Category”
AdvStringGrid1.SubGroup(1); // Group on “SubCategory”
AdvStringGrid1.SubGroup(2); // Group on “Date”
AdvStringGrid1.GroupSum(7); // Add Sum of value
column 7
AdvStringGrid1.GroupSum(8); // Add Sum of value
column 8
AdvStringGrid1.GroupSum(9); // Add Sum of value
column 9
AdvStringGrid1.GroupSum(10); // Add Sum of value
column 10
AdvStringGrid1.ContractAll; // Contract
All nodes
My first question:
Grouping takes
relatively long (20 seconds). Is this the correct way to code grouping and subgrouping?
Does anybody has a suggestion to speed-up this (sub)grouping?
Question 2:
ContractAll doesn’t
contract all nodes. Just the nodes from the “Main group” (Category). Is it
possible to contract also the subgroup nodes by code?
Question 3:
Groupsum(1) just
adds the summary per group (in my case per “Category”). Is it possible to a
groupsum to a subgroup? I could not find a SubGroupSum, SubGroupAvg…. methods.
Question 4:
Is it possible to show the column group summaries as individual values in the groupheader? When I use the mergesummary := true and mergeheader := true, the sum values from all 4 columns are summarized
Thanks for your help.
Martijn