Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Highlight Problem - Can you Duplicate it?
Message
From
16/09/2005 16:21:42
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01049139
Message ID:
01050491
Views:
19
OK, sorry for the inconvenience, I can only say it is Friday! :o) I got it working. I just had to change getpolicygridcolor(). Don't know where my mind is today but this does work:

ofrmprofile.getpolicygridcolor()
LPARAMETERS tcControlSource, tcColumn

LOCAL defaultcolorvalue, luValue, lnColorRow
defaultcolorvalue = THIS.gridbackcolor
IF TYPE('tcControlSource') <> "C" .OR. EMPTY(tcControlSource)
	RETURN defaultcolorvalue
ENDIF
tcControlSource = IIF(AT('.',tcControlSource) > 0,UPPER(ALLTRIM(SUBSTR(tcControlSource,AT('.',tcControlSource)))),UPPER(ALLTRIM(tcControlSource)))
IF TYPE('tcColumn') <> "N"
	tcColumn = 0
ENDIF

IF TYPE('this.pgfprofile.pagpolicy.policygrid') = "O" .AND. !ISNULL(THIS.pgfprofile.pagpolicy.policygrid)
	WITH THIS.pgfprofile.pagpolicy.policygrid
		IF USED(.RECORDSOURCE)
			SELECT (.RECORDSOURCE)
			defaultcolorvalue = IIF(RECNO(.RECORDSOURCE)<>.irecno,THIS.gridbackcolor,THIS.HIGHLIGHTBACKCOLOR)
			DO CASE
				CASE tcControlSource = "PO_STATUS" 
					lnColorRow = ASCAN(_vstatus, EVALUATE(m.tcControlSource), 1,-1,1,2+4+8)
					IF lnColorRow > 0 .AND. !EMPTY(_vstatus[m.lnColorRow,2])
						defaultcolorvalue =  EVALUATE(_vstatus[m.lnColorRow,2])
					ENDIF
			        defaultcolorvalue = IIF(RECNO(.RECORDSOURCE)=.irecno .and. defaultcolorvalue=thisform.gridbackcolor,THIS.HIGHLIGHTBACKCOLOR,defaultcolorvalue)
				CASE tcControlSource = "PO_SUSP" 
					lnColorRow = ASCAN(_vstatus, PO_STATUS, 1,-1,1,2+4+8)
					IF lnColorRow > 0 .AND. !EMPTY(_vstatus[m.lnColorRow,2])
						defaultcolorvalue =  EVALUATE(_vstatus[m.lnColorRow,2])
					ENDIF
			        defaultcolorvalue = IIF(RECNO(.RECORDSOURCE)=.irecno .and. defaultcolorvalue=thisform.gridbackcolor,THIS.HIGHLIGHTBACKCOLOR,defaultcolorvalue)
				CASE tcControlSource = "PO_TYPE"
					lnColorRow = ASCAN(_vtype, EVALUATE(m.tcControlSource), 1,-1,1,2+4+8)
					IF lnColorRow > 0 .AND. !EMPTY(_vtype[m.lnColorRow,3])
						defaultcolorvalue = EVALUATE(_vtype[m.lnColorRow,3])
					ENDIF
			        defaultcolorvalue = IIF(RECNO(.RECORDSOURCE)=.irecno .and. defaultcolorvalue=thisform.gridbackcolor,THIS.HIGHLIGHTBACKCOLOR,defaultcolorvalue)
			ENDCASE
		ENDIF
	ENDWITH
ENDIF
RETURN m.defaultcolorvalue
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform