Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SetAll(
Message
De
28/07/2004 10:24:30
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
28/07/2004 10:16:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00928699
Message ID:
00928707
Vues:
32
Perhaps for debugging purposes, you should try to separate the SetAll() from the Dynamic... property.

Experiment #1: Use SetAll() to set something simpler, not a Dynamic property.

Experiment #2: Set a Dynamic property manually, either in the property sheet or in Init() - for one column at a time. Start with a single column, and see what happens.


>Can anyone tell me what's wrong with the following "SetAll( "Dynamic.."..." call?
>
>While setting the values - no problem. It's only on .refresh() of the grid, or when I click somewhere in the form that I get the error:
>
>"Expression is invalid.  Use a valid expression for Dynamic..."
>
>and I get it at least twice for each.
>
>Select CENZNFLD		
>If SEEK( lnCompID)
>    Scan While AP_ID 	= lnAPID ;
>         And   AP_FLD_ID 	= lnAPFldID
>      lcFieldName	= ALLTRIM( FIELD_NAME)
>      lnAPFactor	= AP_FACTOR
>      Select csrZVARXACT
>      Locate For ALLTRIM( FIELDNAME) = lcFieldName
>      If FOUND()
>	replace FIELDVAL With lnAPFactor In csrZVARXACT
>      Endif
>    Endscan
>    With Thisform.grdCenZoneFields
>      .SetAll( "DynamicBackColor", "IIF( AP_FACTOR > 0, RGB( 0, 0, 255), RGB( 255, 255, 255))", "Column")
>      .SetAll( "DynamicForeColor", "IIF( AP_FACTOR > 0, RGB( 255, 255, 255), RGB( 0, 0, 255))", "Column")
>    Endwith
>Endif
>
>As far as I can ascertain the syntax is exactly as in Help, i.e.
>
>frmMyForm.grdGrid1.SetAll("DynamicBackColor", "IIF(MOD(RECNO( ), 2)=0, ;
>RGB(255,255,255), RGB(0,255,0))", "Column")
>
>Thanks
>
>Terry
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform