Sorting with date

Sorting with date

Postby 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.
Dato0011
 
Posts: 3
Joined: Thu 12 Aug 2010 16:31

Postby 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.
Dimon
Devart Team
 
Posts: 2885
Joined: Mon 05 Mar 2007 16:32


Return to VirtualDAC