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