To recreate:
1. The user scrolls vertically (to the right) and put into view a column that was not first visible
2. Then sorts by this column
The grid scrolls back back to the left (the sort is being maintained)
I'm using: windows 10, Lazarus 2.2.4, Grid 1.1
Grid view changes after sorting
Grid view changes after sorting
- Attachments
-
- 2.png (31.13 KiB) Viewed 26580 times
-
- 3.png (46.19 KiB) Viewed 26580 times
-
- 4.png (32.27 KiB) Viewed 26580 times
Last edited by stoffman on Fri Apr 07, 2023 2:27 am, edited 1 time in total.
Re: Grid view changes after sorting
Missing is the first state of the grid:
- Attachments
-
- 1.png (47.8 KiB) Viewed 26579 times
Re: Grid view changes after sorting
Hello,
Thank you for the issue report. We will look for a solution for it.
In the meantime there may be some form of workaround available using the current x and y scroll locations taken before the sort.
ie.
You can obtain scroll positions:
Those can be restored via:
If you are running the sort from a button then you could add the code in there; if not then we'll likely need to think of another way in.
Regards
Marc Meumann
Thank you for the issue report. We will look for a solution for it.
In the meantime there may be some form of workaround available using the current x and y scroll locations taken before the sort.
ie.
Code: Select all
private
{ Private declarations }
oldX : Single;
oldY : Single;
Code: Select all
type
MyScrollableControl=class(TScrollableControl);
procedure TMyForm.Button5Click(Sender: TObject);
begin
oldX := MyScrollableControl(TeeGrid1).GetScrollX;
oldY := MyScrollableControl(TeeGrid1).GetScrollY;
end;
Code: Select all
MyScrollableControl(TeeGrid1).SetScrollX(oldX);
MyScrollableControl(TeeGrid1).SetScrollY(oldY);
Regards
Marc Meumann
Steema Support