Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listview DateTime Sorting
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00334976
Message ID:
01045012
Vues:
38
Hi Andrew,

If I add columns in run-time using this code:
THISFORM.ListView.OBJECT.Icons 	 = THISFORM.ImageListLarge.OBJECT
			THISFORM.ListView.OBJECT.SmallIcons = THISFORM.ImageListSmall.OBJECT

			loListItem = thisform.ListView.ListItems.ADD( ,m.lcImgKey+SYS(2015), JUSTFNAME(m.lcFile), m.lnIndexLarge, m.lnIndexSmall)
			m.loListItem.SubItems(1) = .SIZE
			m.loListItem.SubItems(2) = ALLTRIM(m.loIconBuddy.cFileType)
			m.loListItem.SubItems(3) = .DateLastModified


how can I use your idea?

>Jeff,
>
>The way I do this is to have a hidden (width = 0) column with text based on ttoc(< datetime value >, 1). The click event of the main datetime columns then sets the sort key to the hidden column.
>
>For complex lists (for example with multiple date and numeric columns), I store the associated sort index for each column in its tag property.
>
>Cheers,
>
>Andrew
>
>>I have created a listview (v6.0) that contains datetime data. When the list is sorted on that column and if the data contains dates that span the year 2000, the list will not sort properly. For example, the following dates:
>>
>>11/20/1999 10:00
>>01/12/2000 09:15
>>01/14/2000 13:00
>>
>>Sort ASCENDINGly like this:
>>
>>01/12/2000 09:15
>>01/14/2000 13:00
>>11/20/1999 10:00
>>
>>I have tried and tried to get it to work properly. I have changed the system settings, foxpro settings, etc. But, nothing works.
>>
>>Any ideas?
>>
>>Thanks,
>>
>>Jeff Elmore
>>jeffrey.elmore@unisys.com
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform