I am pulling data into a cursor and an associated value for each field that indicates the value's status, for example
SELECT name, address, zip FROM myTable
and for each field, I have an associated "Current" status (T or F) which is generated in the selection routine.
What I want to do is display a grid showing the cursor and change the background color depending on the associated "Current" value.
I was thinking of doing something along the line of...
DEFINE CLASS RecordSet as Collection
*FOR EACH FIELD IN THE CURSOR
FOR i= 1 to FCOUNT()
STORE FIELD(I) TO fldname
*ADD THE VALUE AND STATUS TO THE RECORDSET COLLECTION
THIS.AddObject(fldname,'RecordValues')
*UPDATE THE VALUES
THIS.&FLDNAME..VALUE = eval('Cursor.'+fldname)
THIS.&FLDNAME..CURRENT = GetFieldStatus()
ENDFOR
ENDDEFINE
DEFINE CLASS RecordValues as Custom
Value=""
Current=.F.
ENDDEFINE
Then define a grid using the recordset and showing a background color based on the Current property.
What I don't want to do, is to have to requery for the status once I get the data as it would take an inordinate amount of time for large recordsets.
Any ideas or comments would be most appreciated.
TIA,
Larry Long