Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Highlighting changed records in a grid
Message
From
07/06/1998 10:11:45
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
06/06/1998 08:43:05
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00105492
Message ID:
00105614
Views:
32
>Thanks Josh, I'll give it a try! I've written the code for detecting changed records and it works successfully. It's a simple app that requires no data entry, just the viewing of text files, after import into the database, in three different variations, a grid, a report and another form that has specifics about the item on it, with all three of these forms being on the screen at one time.

Just a tip - when you run this code, write this result into a field in the table, cursor or whatever you show in the grid. This way you can have
IIF(alias.Changed,RGB(255,0,0),RGB(255,255,255))
which will work reasonably quicker than if you run a function as the first argument of this Iif(); I have an impression that Dynamic* properties are re-evaluated for every cell in the grid when it refreshes. If I'm right, the expression should be kept as simple as possible.

Furthermore, you may store your choice of colors into an array:

bgColor[1]=rgb(255,255,255)
bgColor[2]=rgb(255,255,127)
...
bgColor[10]=rgb(63,63,63)

and have a, say, Bgc field in your table/cursor/view with values of 1 to 10. Now your DynamicBackColor may be
="bgColor[alias.bgc]"
and this may be even quicker than Iif, because it involves no calculation, and should look rather nice (if you hit the right colors :).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform