Issue with UndoSort and Filter

Hi,

Windows 7 x64
Delphi 10.1 update 2
TMS Component Pack 8.5.7.0

Create a new project with a grid and following code:

procedure TForm2.FormCreate(Sender: TObject);
begin
   AdvStringGrid1.ColWidths[0] := 150;
   AdvStringGrid1.ColCount := 1;
   AdvStringGrid1.RowCount := 7;
   AdvStringGrid1.FixedRows := 2;
   AdvStringGrid1.SortSettings.Show := True;
   AdvStringGrid1.SortSettings.UndoSort := True;
   AdvStringGrid1.FilterEdit.Row := 1;
   AdvStringGrid1.FilterEdit.Enabled := True;

   AdvStringGrid1.Cells[0,0] := 'TITLE';
   AdvStringGrid1.Cells[0,2] := '111';
   AdvStringGrid1.Cells[0,3] := '112';
   AdvStringGrid1.Cells[0,4] := '113';
   AdvStringGrid1.Cells[0,5] := '122';
   AdvStringGrid1.Cells[0,6] := '133';
end;


Run the project.
Click the title column twice so that the column is sorted in a desc order (133, 122, 113, 112, 111).
Enter 13 in the filter cell and press enter. Grid will show 133 and 113).
Click the title column three times so that you and up with the same desc sort order (133 and 113)
Erase the '13' filter so that all rows show again. Grid will still be in desc sort order and show 133, 122, 113, 112, 111.
Click the title column one time so that you are unsorted.

Notice that the rows are not in their original order. The original order is lost. This is the issue.

Is this something that can be fixed?

Thanks




The sorting on the filtered grid updates the sort order for only rows that remain filtered and this destroys the original sort order reference for the unfiltered grid. This won't be trivial to handle. We'll investigate this.

Hi,

any update regarding this issue?

I have a project on hold and would like to use this functionnality if it can be fixed. If not I'll start over with a new strategy.

Thanks

This is not something we'll be able to provide on short term. It is non-trivial and a change in this area has many implications that need to be handled with very high care not to break backwards compatibility. So all this will require a significant amount of time that would affect other already planned & ongoing work here on short time.