Steve-vfp9user
Programmer
All,
I have a grid containing rows of table records.
I use the following code within the Object: Grid1
Procedure: AfterRowColChange
Procedure: Init
When the grid on the form is started, the highlighted line is blue with white text which works perfectly and each changes accordingly as you scroll though.
Some of the records in a column with the table name JOBSTATUS have the letter "R" (without the quotes) to show it is a refund.
What I am trying to achieve is that when the form is loaded, any records with the condition JOBSTATUS="R" that only the cell within the grid will be shown as the back colour being red and the fore colour in white.
There are several FAQ's in the forum but none that give any information about changing a single cell linked to a condition.
Any guidance or suggestion would be appreciated.
Thank you
Steve Williams
I have a grid containing rows of table records.
I use the following code within the Object: Grid1
Procedure: AfterRowColChange
Code:
LPARAMETERS nColIndex
grno = RECNO()
thisform.grid1.Refresh
Procedure: Init
Code:
PUBLIC grno
grno = RECNO()
this.setall("Dynamicbackcolor", ;
"IIF(RECNO()=grno,RGB(0,0,160),RGB(255,255,255))","Column")
this.setall("DynamicForecolor", ;
"IIF(RECNO()=grno,RGB(255,255,255),RGB(0,0,0))","Column")
When the grid on the form is started, the highlighted line is blue with white text which works perfectly and each changes accordingly as you scroll though.
Some of the records in a column with the table name JOBSTATUS have the letter "R" (without the quotes) to show it is a refund.
What I am trying to achieve is that when the form is loaded, any records with the condition JOBSTATUS="R" that only the cell within the grid will be shown as the back colour being red and the fore colour in white.
There are several FAQ's in the forum but none that give any information about changing a single cell linked to a condition.
Any guidance or suggestion would be appreciated.
Thank you
Steve Williams