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 - Add a method to show or hide or all detail rows
Summary: Add a method to show or hide or all detail rows
Status: RESOLVED FIXED
Alias: None
Product: TeeGrid for Delphi
Classification: Unclassified
Component: Grid (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: david berneda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-24 23:53 EDT by dean.mustakinov
Modified: 2022-11-08 07:02 EST (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.