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 1800 - Tee.Grid.Totals unit not added to "uses" automatically
Summary: Tee.Grid.Totals unit not added to "uses" automatically
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: 2017-02-23 04:10 EST by david berneda
Modified: 2017-02-23 10:03 EST (History)
0 users

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 david berneda 2017-02-23 04:10:00 EST
When adding a new "Totals" band (grid editor -> header or footer -> "+" button), the IDE does not automatically add the corresponding unit to the "uses" clause.

For example, for "Totals" bands, this is:  "uses Tee.Grid.Totals"

Because of this problem, running a project will raise an exception like: "TColumnTotals class not found"

The workaround is to manually add that units to the "uses" clause.

The solution is (similar to what we do in TeeChart with TeeGDIPlus), to create a new derived TSelectionEditor at VCL and FMX GridRegister.pas units.

See TeeChartReg.pas unit for examples:

  TTeeDBChartSelectionEditor = class(TSelectionEditor)
  public
    procedure RequiresUnits(Proc: TGetStrProc); override;
  end;
Comment 1 david berneda 2017-02-23 10:03:39 EST
Added new type:

 TTeeGridSelectionEditor=class(TSelectionEditor)

for both VCLTeeGridRegister and FMXTeeGridRegister units.

This method calls a new protected method at TCustomTeeGrid:

  function HasBandOfClass(const AClass:TGridBandClass):Boolean;

which is generic, to pass new GridBand classes in the future (if they are located in new units)