Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Click Event From Grid Header
Message
De
11/11/1998 10:02:10
 
 
À
10/11/1998 15:11:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00156309
Message ID:
00156576
Vues:
42
Edward,

I am having a slight problem with the index solution. If I click the header of a column to change the sorting order, it works fine the first time. When I change columns and select a different column header, it sorts using the original index and not the new column.

Below is my code:

Thanks Scott

**--Code Placed in each column header.
thisform.grid_sort(this.caption)

***** Grid_Sort Method **********
**--This sort is called from the grid header
**--cField parameter comes from the header caption
**--which is the actual name of the field
parameters cField

cAlias = thisform.grid1.recordsource
select (cAlias)

**--Remove the index tag so I can issue a
**--new index
delete tag ALL of sortindx

index on &cField tag sortindx

**--Sortorder property used to determine sort order
if thisform.sortorder = .f.
set order to sortindx ASCENDING
else
set order to sortindx DESC
endif

go top
thisform.sortorder = !thisform.sortorder
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform