Page 1 of 1

Sorting with date

Posted: Thu 12 Aug 2010 16:39
by Dato0011
Hello

I have a TVirtualTable with some field names. One of them is TDateTime.
I populate this way

Code: Select all

  HistoryTable.First;
  while not HistoryTable.Eof do
    begin
      lvItem := lvHistory.Items.Add;
      HistoryImageList.AddIcon(GetIcon(HistoryTableProcessPath.AsString, isSmall));
      lvItem.Caption := ExtractFileName(HistoryTableProcessPath.AsString);
      lvItem.ImageIndex := HistoryImageList.Count - 1;
      lvItem.SubItems.Add(IntToStr(HistoryTable.RecNo));
      HistoryTable.Next;
    end;
but this code populates the data sorted with HistoryTableProcessPath, and I want to sort with HistoryTableDate which is a TDateTimeField.
I tried IndexFieldNames but it didn't help, I've got the same result.

Any help is greatly appreciated.

Posted: Fri 13 Aug 2010 13:54
by Dimon
I can not reproduce the problem.
Please send me a complete small sample to dmitryg*devart*com to demonstrate it.