Delphi version: Seattle
TTeeGrid version: VCL & FMX Registered version-1.05
Multidevice Application (FMX)
Platform: WIN32
When the sort is enabled in a TTeeGrid, and all the columns are not shown, if you navigate to a non-visible column (scroll right) and press the header to sort, the first columns are shown again, and the scroll bar remains on the right.
I attached an example, (the demo.xml file is not included, if you wish, request it and send it to you in separate mail.)
Problem with the order when you have to scroll with a column
-
- Newbie
- Posts: 25
- Joined: Tue Mar 13, 2018 12:00 am
Problem with the order when you have to scroll with a column
- Attachments
-
- TEE_GRID.zip
- Ejemplo
- (3 KiB) Downloaded 1509 times
Re: Problem with the order when you have to scroll with a column
Hello,
Please send that .xml to "info at steema dot com" referring this thread so we can run the example here.
Please send that .xml to "info at steema dot com" referring this thread so we can run the example here.
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: Problem with the order when you have to scroll with a column
Good afternoon Yeray,
Most of the problems that I am finding I am evaluating in the form contained in the file that I attach, also includes the data in xml format.
The problem discussed in this post, has as workaround, for FMX.Win32.Seattle, forcing all the numerical columns to be aligned to the left, as you suggested in the post Re: When sorting, the size of all the columns changes and the gr.
Greetings.
Most of the problems that I am finding I am evaluating in the form contained in the file that I attach, also includes the data in xml format.
The problem discussed in this post, has as workaround, for FMX.Win32.Seattle, forcing all the numerical columns to be aligned to the left, as you suggested in the post Re: When sorting, the size of all the columns changes and the gr.
Code: Select all
TeeGrid1.Columns [2] .TextAlignment: = TColumnTextAlign.Custom;
TeeGrid1.Columns [2] .TextAlign.Horizontal: = THorizontalAlign.Left;
- Attachments
-
- FormTeeGrid_DEBUG.zip
- (3.21 KiB) Downloaded 1422 times
Re: Problem with the order when you have to scroll with a column
Greetings,
The attached modified units resolve the "x-displacement after sort" issue. The x relocation is caused due to the combined behaviour of grid & dataset and needs to be corrected with the example client code.
Regards,
Marc
The attached modified units resolve the "x-displacement after sort" issue. The x relocation is caused due to the combined behaviour of grid & dataset and needs to be corrected with the example client code.
Regards,
Marc
- Attachments
-
- FixedXScroll.zip
- (3.3 KiB) Downloaded 1459 times
Steema Support
-
- Newbie
- Posts: 25
- Joined: Tue Mar 13, 2018 12:00 am
Re: Problem with the order when you have to scroll with a column
Gracias Marc,
This workaorund, solves the problem discussed in this thread, and
additionally, it solves other problems related to a TTeeGrid, associated with a TDataSet:
.- After modifying the contents of a cell, scroll to the first page
.- After calling TFDataSet.RefreshRecord, scroll to the first page
.- When ordering, the fields that were aligned to the right, changed the width of the columns.
For the solution to be generic, it is necessary to restore the horizontal and vertical scroll after calling methods that modify or refresh the TDataSet, eg:
Greetings and thanks for this alternative solution, I was having enough problems ...
This workaorund, solves the problem discussed in this thread, and
additionally, it solves other problems related to a TTeeGrid, associated with a TDataSet:
.- After modifying the contents of a cell, scroll to the first page
.- After calling TFDataSet.RefreshRecord, scroll to the first page
.- When ordering, the fields that were aligned to the right, changed the width of the columns.
For the solution to be generic, it is necessary to restore the horizontal and vertical scroll after calling methods that modify or refresh the TDataSet, eg:
Code: Select all
{STEEMA WORKAROUND Problem with the order when you have to scroll with a column}
X: = TeeGrid1.Current.Rows.Scroll.X;
Y: = TeeGrid1.Current.Rows.Scroll.Y;
Column: = <- Optionally, Get the selected column
Row: = <- Optionally, Get the index of the selected row.
{STEEMA WORKAROUND Problem with the order when you have to scroll with a column}
// Call TDataSet.Refresh, TFDDataSet.RefreshRecord, TTeeGri.Data.SetValue or Sort a TFDDataSet,
{STEEMA WORKAROUND Problem with the order when you have to scroll with a column}
TGridAccess (TeeGrid1) .ChangeVertScroll (Y);
TGridAccess (TeeGrid1) .ChangeHorizScroll (X);
// Optionally, re-select the selected cell.
TeeGrid1.Selected.Change (Column, Row);
{STEEMA WORKAROUND Problem with the order when you have to scroll with a column}
Greetings and thanks for this alternative solution, I was having enough problems ...