Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2436

Summary: Add a method to show or hide or all detail rows
Product: TeeGrid for Delphi Reporter: dean.mustakinov
Component: GridAssignee: david berneda <david>
Status: RESOLVED FIXED    
Severity: enhancement CC: marc
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description dean.mustakinov 2021-06-24 23:53:49 EDT
TeeGrid for Delphi v1.10.

In the "Master_Detail_FireDAC" demo it is not possible to easily expand all child rows.

I have created a convenience method to show or hide all child rows of a row group.

In Tee.Grid.RowGroup.pas: 
  Added public method:
procedure TRowGroup.ShowHideAllDetail(const ACol: Integer; const AShow: Boolean);
var 
    tmpBand : TGridBand;
    r : Integer;
begin
  if Rows.Data = nil then Exit;
  for r := 0 to Rows.Data.Count - 1 do
  begin
    tmpBand:=Rows.Children.Row[r];
    if AShow then begin
      if (tmpBand = nil) or (not tmpBand.Visible) then ToggleDetail(Columns[ACol].Render, r);
    end
    else if (tmpBand <> nil) and (tmpBand.Visible) then ToggleDetail(Columns[ACol].Render, r);
  end;
end;
Comment 1 marc meumann 2022-11-08 07:02:29 EST
Thank you for the input Dean, we've added the functionality.