Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listbox code
Message
De
24/10/2008 17:46:18
 
 
À
24/10/2008 15:51:17
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01357042
Message ID:
01357091
Vues:
19
>I'm trying to get a ListBox to sort on the 2nd column (TypeDesc), but it just always sorts on the 1st column (TypeCode). What do I need to do?
>
>	WITH .Container1.lstAvailable
>		SELECT AvailableServiceTypes
>		SCAN FOR ! DELETED()
>			.AddItem( TypeCode )
>			.List[ .NewIndex, 2 ] = TypeDesc
>		ENDSCAN
>		.Sorted = .T.
>	ENDWITH
>
If you use Sorted=.T. the the Lisbox will be always sorted by the 1st column. However, you can get around it by adding 1st column with zero width (check ColumnWidths property how to do it). Btw, you should use AddListItem to fill a listbox with 2 or more columns.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform