Sorting with date

Discussion of open issues, suggestions and bugs regarding Virtual Data Access Components for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Dato0011
Posts: 3
Joined: Thu 12 Aug 2010 16:31

Sorting with date

Post by Dato0011 » Thu 12 Aug 2010 16:39

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.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 13 Aug 2010 13:54

I can not reproduce the problem.
Please send me a complete small sample to dmitryg*devart*com to demonstrate it.

Post Reply