StringGrid last column not sorted for 'h:mm:ss.hs'

Using the latest component pack, when in a AdvStringGrid the last column contains a time string in format h:mm:ss.hs, the sorting via clicking on the column header is not working; if the last 2 columns have this format, both cannot be sorted. When the string is formatted h-mm-ss.hs, sorting works. Sorting of the ':' formatted strings in the last but one column works when the last is formatted with '-'.


For testing, create a new form, place a TAdvStringGrid and 2 TCheckbox on the form. Form event OnCreate must be set to FormCreate, paste the following code: 

procedure TForm1.CheckBox1Click(Sender: TObject);
var
  fc: string;
  col: integer;
begin
  if (Sender as TCheckBox).Checked
    then fc := ':'
    else fc := '-';
  if Sender = CheckBox1
    then col := 2
    else col := 3;
  AdvStringGrid1.Cells[col,1] := '0'+fc+'00'+fc+'04.34';
  AdvStringGrid1.Cells[col,2] := '0'+fc+'01'+fc+'05.75';
  AdvStringGrid1.Cells[col,3] := '0'+fc+'02'+fc+'20.12';
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  CheckBox1.Caption := '1st Time Column';
  CheckBox2.Caption := '2nd Time Column';
  CheckBox1.OnClick := CheckBox1Click;
  CheckBox2.OnClick := CheckBox1Click;
  AdvStringGrid1.SortSettings.Show := true;
  AdvStringGrid1.ColCount := 4;
  AdvStringGrid1.RowCount := 4;
  AdvStringGrid1.Cells[0,0] := '#';
  AdvStringGrid1.Cells[1,0] := 'Text';
  AdvStringGrid1.Cells[2,0] := 'RunTime';
  AdvStringGrid1.Cells[3,0] := 'RunTime Alt.';
  AdvStringGrid1.Cells[0,1] := '1';
  AdvStringGrid1.Cells[1,1] := 'AAA';
  AdvStringGrid1.Cells[2,1] := '0-00-04.34';
  AdvStringGrid1.Cells[3,1] := '0-00-04.34';
  AdvStringGrid1.Cells[0,2] := '2';
  AdvStringGrid1.Cells[1,2] := 'CCC';
  AdvStringGrid1.Cells[2,2] := '0-01-05.75';
  AdvStringGrid1.Cells[3,2] := '0-01-05.75';
  AdvStringGrid1.Cells[0,3] := '3';
  AdvStringGrid1.Cells[1,3] := 'BBB';
  AdvStringGrid1.Cells[2,3] := '0-02-20.12';
  AdvStringGrid1.Cells[3,3] := '0-02-20.12';
end;

Thanks!
Matthias

The ssTime sort type cannot sort such time format. First of all, it expects that the time is formatted in the same way as the Delphi TimeToStr() function would format it and secondly, it doesn't  support hundreds of seconds.
To sort such types, you'd need to implement custom compare, i.e. set sort style = ssCustom and implement the OnCustomCompare() routine.

I didn't know that sorting could be type/content sensitive, so after checking the manual it's much clearer now; reading the developer guide is a clear advantage ;-) As I have fixed width in the formatted time, a simple string sort does the trick, setting "autoformat" to false is all I needed to change in the end. Thanks for your help!