Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting a column in a grid
Message
De
10/07/2001 11:22:42
 
 
À
09/07/2001 17:25:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00528362
Message ID:
00528651
Vues:
18
>Thanks Trey, I have also found I can click and drag a column. So if I increase the columncount by 1 (as you suggested) it adds the new column. I then clicked and draged the column to where I wanted it!
>
>However, in a FOR EACH oCol in THISFORM.grdAsso.COLUMNS, VFP still thinks it's the 10th column and not the 2nd, which it appears to be.
>
>Thanks again for the input.
>Julian
>
>PS: Any thoughts on this ordering?

Column Index is what For Each and Columns(i) uses. It's always the order they were added in.
What are you checking in that For Each loop to see if it's the 2nd column?
Checking the ColumnOrder should do it.
One other way would be do a double loop, e.g.
With thisform.grdAsso
  For ji = 1 to .ColumnCount
    For Each loCol In .Columns
      If loCol.ColumnOrder = ji
        ** this is the column in visual order
      EndIf
    EndFor
  EndFor
EndWith
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform