Sorting and Grouping data in Lazarus

TeeGrid VCL / FMX for Embarcadero RAD Studio, Delphi, C++ Builder and Lazarus Free Pascal.
Post Reply
Nintegra
Newbie
Newbie
Posts: 3
Joined: Mon Sep 27, 2021 12:00 am

Sorting and Grouping data in Lazarus

Post by Nintegra » Wed Sep 29, 2021 12:46 pm

Is it possible to sort and group data in TeeGrid in Lazarus? I have data with several thousand rows and a couple of dozen columns and I need to sort and group it by clicking the header.
I tried to use different data providers, for example:
- RTTI. Can't compile. Seems not supported in Lazarus.
- DB. The sorting and grouping functions are not supported by default.
- Strings. It is an array of arrays of strings. Also does not support sorting and grouping by default.

So maybe I'm missing something. Could you show examples of these functions in Lazarus?

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

Re: Sorting and Grouping data in Lazarus

Post by Marc » Wed Oct 06, 2021 10:34 am

Hello,

We're looking at options. TeeGrid Sort depends on the availability of RTTI. We'll get back with any suggestions we may be able to make.

Regards,
Marc Meumann
Steema Support

Nintegra
Newbie
Newbie
Posts: 3
Joined: Mon Sep 27, 2021 12:00 am

Re: Sorting and Grouping data in Lazarus

Post by Nintegra » Mon Nov 08, 2021 9:43 am

Ok, i am using TBufSet and Indexes to sort data. But i can't find the way to simple concatenate columns.

For example i need just a header in two columns. But when i try to do this, the data is always empty.
(demo -> Lazarus -> Database -> ClientDataSet)
screeen1.png
screeen1.png (50.45 KiB) Viewed 36049 times
In the default stringgrid, I can concatenate columns by drawing rectangles above the cells. Is there something like this in teegrid?

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Sorting and Grouping data in Lazarus

Post by Yeray » Thu Nov 11, 2021 2:55 pm

Hello,

I'm not sure to understand the situation. You seem to be adding two sub-columns under "TITLE", but then you want to concatenate them?
Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Nintegra
Newbie
Newbie
Posts: 3
Joined: Mon Sep 27, 2021 12:00 am

Re: Sorting and Grouping data in Lazarus

Post by Nintegra » Fri Nov 12, 2021 2:10 pm

Yes, that's right, I added two columns. But, I cannot put the data inside.

For example, i want to move the "title" data inside the "qwe" column, and the "author" data inside the "asd" column.
scrn 2021-11-12 170918.png
scrn 2021-11-12 170918.png (10.22 KiB) Viewed 35952 times
This project is from the official demo.
Attachments
tee_grid_demo_project.zip
(160.72 KiB) Downloaded 1579 times

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Sorting and Grouping data in Lazarus

Post by Yeray » Fri Nov 19, 2021 2:15 pm

Hello,

I'm afraid the only way to do this would be using a different structure as explained here.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply