When sorting, the size of all the columns changes and the gr
-
- Newbie
- Posts: 25
- Joined: Tue Mar 13, 2018 12:00 am
When sorting, the size of all the columns changes and the gr
Delphi version: Seattle
TTeeGrid version: VCL & FMX Registered version-1.05
Multidevice Application (FMX)
Platform: WIN32
I have attached your demo (Unit_Custom_Sorting.pas/fmx) with an added column of type integer so that you can reproduce the behavior.
The following happens, if you click on any of the three columns everything works as expected.
The unexpected behavior occurs when in the new column "id" the focus is placed in some cell of that column and click on the header of the column "id", to change the order.
At that time the width of all columns grows to a size that does not fit in the grid and the grid becomes unmanageable.
This behavior I have only observed in columns that contain numbers. that's why I added the id column as integer.
PD:
I also attached an example in TEE_GRID.zip and Lib_GridEx, with TVirtualFDDatasetData a descendant of TVirtualDBData, to facilitate the ordering of a TFDDataSet (The demo.xml file is not included, if you wish, request it and send it to you in separate mail.)
TTeeGrid version: VCL & FMX Registered version-1.05
Multidevice Application (FMX)
Platform: WIN32
I have attached your demo (Unit_Custom_Sorting.pas/fmx) with an added column of type integer so that you can reproduce the behavior.
The following happens, if you click on any of the three columns everything works as expected.
The unexpected behavior occurs when in the new column "id" the focus is placed in some cell of that column and click on the header of the column "id", to change the order.
At that time the width of all columns grows to a size that does not fit in the grid and the grid becomes unmanageable.
This behavior I have only observed in columns that contain numbers. that's why I added the id column as integer.
PD:
I also attached an example in TEE_GRID.zip and Lib_GridEx, with TVirtualFDDatasetData a descendant of TVirtualDBData, to facilitate the ordering of a TFDDataSet (The demo.xml file is not included, if you wish, request it and send it to you in separate mail.)
- Attachments
-
- Custom Sorting.zip
- C:\Program Files (x86)\Steema Software\Steema TeeGrid for VCL & FMX Registered version-1.05\demos\FireMonkey\Custom Sorting\
- (2.54 KiB) Downloaded 2336 times
-
- TEE_GRID.zip
- My sample
- (3 KiB) Downloaded 2311 times
-
- Newbie
- Posts: 25
- Joined: Tue Mar 13, 2018 12:00 am
Re: When sorting, the size of all the columns changes and the gr
Good afternoon Yeray,
I have been able to observe that in certain occasions in the call to Tee.GridData.DB.TVirtualDBData.AutoWidth (), it resulted: = APainter.TextWidth ('0') * tmpL; returns unexpectedly high values (eg 199990,15625) and therefore the grid is not able to display the columns correctly.
This happens, when doing tests, I change TeeGrid.Data to assign another datasource, and coincidentally the focus is in a numeric cell.
It also occurs when the sort is enabled and the column button is pressed and the focus is in a numeric cell.
The first time TeeGrid.Data is assigned, the data is displayed correctly.
I suspect that the problem may have to do with the alignment on the right.
Saludos
I have been able to observe that in certain occasions in the call to Tee.GridData.DB.TVirtualDBData.AutoWidth (), it resulted: = APainter.TextWidth ('0') * tmpL; returns unexpectedly high values (eg 199990,15625) and therefore the grid is not able to display the columns correctly.
This happens, when doing tests, I change TeeGrid.Data to assign another datasource, and coincidentally the focus is in a numeric cell.
It also occurs when the sort is enabled and the column button is pressed and the focus is in a numeric cell.
The first time TeeGrid.Data is assigned, the data is displayed correctly.
I suspect that the problem may have to do with the alignment on the right.
Saludos
-
- Newbie
- Posts: 25
- Joined: Tue Mar 13, 2018 12:00 am
Re: When sorting, the size of all the columns changes and the gr
I attached images of the appearance before and after the problem.
- Attachments
-
- After sort o reopen and cell focus on numerico column
- After sort or reopen.jpg (82.79 KiB) Viewed 56152 times
-
- Before sort o reopen and cell focus on numerico column
- Before sort or reopen.jpg (81.36 KiB) Viewed 56152 times
Re: When sorting, the size of all the columns changes and the gr
Hello,
I can reproduce this problem with Seattle, but not with Berlin/Tokyo:REH Outsourcing wrote:I have attached your demo (Unit_Custom_Sorting.pas/fmx) with an added column of type integer so that you can reproduce the behavior.
The following happens, if you click on any of the three columns everything works as expected.
The unexpected behavior occurs when in the new column "id" the focus is placed in some cell of that column and click on the header of the column "id", to change the order.
At that time the width of all columns grows to a size that does not fit in the grid and the grid becomes unmanageable.
This behavior I have only observed in columns that contain numbers. that's why I added the id column as integer.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 25
- Joined: Tue Mar 13, 2018 12:00 am
Re: When sorting, the size of all the columns changes and the gr
Good morning Yeray,
I confirm that the problem is specific to FMX:WIN32 Seattle, when compiling the demonstration project in Tokyo it works correctly.
It is evident that in Seattle there must be some kind of problem, which causes the width of columns to change.
I attach the simplified test project plus the data.
Additionally I observe the following:
.- When TTeeGrid.Editing.AlwaysVisible, the editor is shown but it is not editable, when it is false, it can be edited without problems. (FMX:WIN32: Seattle & Tokyo)
.- TTeeGrid.Editing.Editing.EnterKey = NextCell, is not taken into account, after pressing Enter, the newly edited cell loses focus, but the focus does not go to the next cell, or to any other (FMX:WIN32 Seattle & Tokyo)
I confirm that the problem is specific to FMX:WIN32 Seattle, when compiling the demonstration project in Tokyo it works correctly.
It is evident that in Seattle there must be some kind of problem, which causes the width of columns to change.
I attach the simplified test project plus the data.
Additionally I observe the following:
.- When TTeeGrid.Editing.AlwaysVisible, the editor is shown but it is not editable, when it is false, it can be edited without problems. (FMX:WIN32: Seattle & Tokyo)
.- TTeeGrid.Editing.Editing.EnterKey = NextCell, is not taken into account, after pressing Enter, the newly edited cell loses focus, but the focus does not go to the next cell, or to any other (FMX:WIN32 Seattle & Tokyo)
- Attachments
-
- FormTeeGrid_DEBUG.zip
- Demo and data
- (3.21 KiB) Downloaded 2308 times
Re: When sorting, the size of all the columns changes and the gr
Hello,
The only workaround I can think on right now is to set the "id" column to be aligned to the Left, in Seattle:REH Outsourcing wrote:I confirm that the problem is specific to FMX:WIN32 Seattle, when compiling the demonstration project in Tokyo it works correctly.
It is evident that in Seattle there must be some kind of problem, which causes the width of columns to change.
Code: Select all
TeeGrid1.Columns[2].TextAlignment:=TColumnTextAlign.Custom;
TeeGrid1.Columns[2].TextAlign.Horizontal:=THorizontalAlign.Left;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 25
- Joined: Tue Mar 13, 2018 12:00 am
Re: When sorting, the size of all the columns changes and the gr
Thanks Yeray, at the moment that workaround serves me.
-
- Newbie
- Posts: 25
- Joined: Tue Mar 13, 2018 12:00 am
Re: When sorting, the size of all the columns changes and the gr
You can see an alternative solution, in this post, "Problem with the order when you have to scroll with a column"
Re: When sorting, the size of all the columns changes and the gr
olá sou novo por aqui, gostaria de saber se a um meio de ordenar as colunas sem precisar de código.
Re: When sorting, the size of all the columns changes and the gr
Hello,
There's no editor option to sort columns for the moment so I'm afraid the only way to achieve it with code.olá sou novo por aqui, gostaria de saber se a um meio de ordenar as colunas sem precisar de código.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |