Can't implement Totals using C++

TeeGrid VCL / FMX for Embarcadero RAD Studio, Delphi, C++ Builder and Lazarus Free Pascal.
Post Reply
PCZ
Newbie
Newbie
Posts: 8
Joined: Mon Jul 30, 2018 12:00 am

Can't implement Totals using C++

Post by PCZ » Thu Aug 02, 2018 2:04 am

Hello,

I want to add totals to my grid using C++ but can't do that.
I'm using the example of the getting started guide under "Totals and SubTotals" title, but it is Delphi code.
When I try to translate this code to C++ it fails because the following error message: "undefined symbol TColumnsTotals".
Could you show me how can I implement totals in C++?

Thanks in advance,
Patricio

PCZ
Newbie
Newbie
Posts: 8
Joined: Mon Jul 30, 2018 12:00 am

Re: Can't implement Totals using C++

Post by PCZ » Fri Aug 10, 2018 12:59 am

PCZ wrote:
Thu Aug 02, 2018 2:04 am
Hello,

I want to add totals to my grid using C++, but I can't do that.
I'm using the example of the getting started guide under "Totals and SubTotals" title, but it is Delphi code.
When I try to translate this code to C++ it fails because the following error message: "undefined symbol TColumnsTotals".
Could you show me how can I implement totals in C++?

Thanks in advance,
Patricio
No one has knowledge about how to use TeeGrid with C++ Builder that could help me?
Any help or tip would be appreciated.

Regards,
Patricio

Marc
Site Admin
Site Admin
Posts: 870
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: Can't implement Totals using C++

Post by Marc » Thu Oct 11, 2018 11:17 am

Hello Patricio,

Apologies for having left you unattended with you query.

For the record; an example of implementation of totals by code in C++ would be as follows:

Code: Select all

#include "Tee.Grid.Totals.hpp"

TGridFooter *footer = TeeGrid1->Footer;
TColumnTotals *totals = new TColumnTotals(footer);

totals->Calculation.Clear();
totals->Calculation.Add(TeeGrid1->Columns->Items[0],Sum); //or Count, etc
The Column may be accessed by name.

Regards,
Marc Meumann
Steema Support

Post Reply