Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic Background Colors
Message
De
14/05/2019 05:33:52
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
14/05/2019 05:14:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01668592
Message ID:
01668596
Vues:
53
J'aime (1)
>>>Hi All
>>>
>>>I have a grid populated from a cursor. The cursor has a logical field which I use in the column's DynamicBackColor property to highlight the background of the row or not as the case may be.This is working fine when I first display the table.
>>>
>>>I then change the logical field for the current row of the grid but cannot find a way to trigger a refresh of the columns DynamicBackColor so that the highlight changes appropriately. Issuing a Grid.Refresh does not work. Any suggestions?
>>
>>Depends on how do you change the value. If it involves a checkbox in the grid, the value doesn't really get changed immediately, but after some event (dunno which one, it's been 15 years ago when I fought this). So I'd just make sure that the value is written into the cursor - fire the chekcbox's valid, or issue a replace - before the refresh.
>
>Dragan,
>
>There is no checkbox, just a field in the cursor (which has 3 fields in total; 2 of which are in the grid and the logical field which is not shown in the grid). I can change the logical field (in code) and then issue a Grid.Refresh but nothing changes in the table - the DynamicBackColor does not change for the row I have changed the logical field in.

Hmmm... why not have an integer field with actual color number and use that as the dynamicBackgroundColor expression? Then you calculate the color in there instead of having an iif(...) expression. I do that a lot and it never failed me.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform