General information
Category:
Coding, syntax & commands
Use the setall command. Make sure you lock and unlock your screen when you do this. I believe the procedure has to be in code(prg) not in the form. It has been a while since I wrtoe this.
EXAMPLE
This.Grid1.RECORDSOURCE = 'COMBINED'
THIS.grid1.SETALL("DynamicForeColor",;
"gridcolor(rtrim(thisform.grid1.recordsource))",;
"column")
GO TOP
THIS.grid1.REFRESH
*~*~*~*~*~*~~*~*~*~*~*~*~*~*~~*~*~*~*~*~*~*~*~*~*
PROCEDURE gridcolor
LPARAMETERS tsrecordsource
LOCAL lnbackcolor, lsfield, lsfieldvalue
lnbackcolor = 0
lnbackcolor = RGB(255,255,255) && Default to White
IF !EMPTY(tsrecordsource)
lsfield = tsrecordsource + ".Tableid"
lsfieldvalue = ALLTRIM(EVALUATE(lsfield))
IF lsfieldvalue = "1"
* tfip table - Dark Blue
lnbackcolor = RGB(37,30,130)
ELSE
* tranfile dark red
lnbackcolor = RGB(64,0,0)
ENDIF
ENDIF
RETURN lnbackcolor
ENDPROC
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only