Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
For Each
Message
De
31/10/2001 05:16:09
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
31/10/2001 04:37:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00575508
Message ID:
00575515
Vues:
14
>Can anyone help me to use FOR EACH command
>
>eg. FOR EACH column IN THISFORM.GRID1 ?????
>
>
>Now I am using
>
>FOR mCnt = 1 TO THISFORM.grid1.columncount
> THISFORM.grid1.columns(mCnt).READONLY = 'DDD'
>ENDFOR
>
>TIA.

You can use 'for each' wih any type of collection, even the array. For grids here is a sample :
for each oColumn in thisform.Grid1.Columns && Columns is a collection
 if upper(oColumn.Controlsource) # 'MYALIAS' 
    oColumn.ReadOnly = .T.
 endif
endfor
In your sample SetAll is a shortcut :
THISFORM.grid1.SetAll('ReadOnly',.t.,'Column') && Readonly is logical
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform