I want to implement a order by column feature.
I want to use the OnClickHeader event to do so, but I don't find a method to know these values or the column number of the header I was clicked to.
Access current row/columns cells
-
- Site Admin
- Posts: 83
- Joined: Wed Nov 12, 2003 5:00 am
- Location: Girona, Catalonia
- Contact:
Re: Access current row/columns cells
The "Sender" parameter in the OnClickedHeader event is the column that is under the mouse xy position, you can use it to determine the column index, name etc.
For example:
BUT, I've just found a bug in the code, the OnClickedHeader event is never called.
I'll post asap a "nightly build" with a fix for this issue.
btw: Custom "order by column" (clicking header) will be also included in the "nightly build".
The following demo project shows how to use custom sorting:
https://github.com/Steema/TeeGrid/tree/ ... %20Sorting
For example:
Code: Select all
procedure TFormGridCharts.TeeGrid1ClickedHeader(Sender: TObject);
begin
Caption:=Sender.ClassName;
if Sender is TColumn then
Caption:=Caption+' '+TColumn(Sender).Header.Text+' '+IntToStr(TColumn(Sender).Index);
end;
I'll post asap a "nightly build" with a fix for this issue.
btw: Custom "order by column" (clicking header) will be also included in the "nightly build".
The following demo project shows how to use custom sorting:
https://github.com/Steema/TeeGrid/tree/ ... %20Sorting
-
- Site Admin
- Posts: 83
- Joined: Wed Nov 12, 2003 5:00 am
- Location: Girona, Catalonia
- Contact:
Re: Access current row/columns cells
New beta v1.01 release, and a new example showing how to use "custom sorting"
https://github.com/Steema/TeeGrid/tree/ ... %20Sorting
Nightly build:
http://www.steebi.com/files/code/beta/vcl_fmx/teegrid/
regards !
david
https://github.com/Steema/TeeGrid/tree/ ... %20Sorting
Nightly build:
http://www.steebi.com/files/code/beta/vcl_fmx/teegrid/
regards !
david