Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid DynamicBackcolor property
Message
From
11/09/2005 00:40:24
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Grid DynamicBackcolor property
Miscellaneous
Thread ID:
01048499
Message ID:
01048499
Views:
77
Dear All,

Using Cetin's idea on dynamicBackcolor, I want to display the information in a grid where 2 backcolor alternated each other, such like single recno or double recno... however, this time is using the date, the records with same date using same backcolor...

IN dynamicbackcolor of the grid
Thisform.pf1.tx.SetAll("dynamicbackcolor","IIF(MOD(thisform.getbackcolor(ptt1.tx_date,'ptt1'),2)=0,RGB(212,237,218),RGB(255,255,255))", "Column")
Custom Method: getbackcolor
LPARAMETERS tdate, cTable

DO CASE
CASE cTable = 'ptt1'
	SELECT RECNO('tmpvisit1') as a FROM tmpVisit1 INTO CURSOR tmp WHERE tx_date = tdate
CASE cTable = 'ptt2'
	SELECT RECNO('tmpvisit2') as a FROM tmpVisit2 INTO CURSOR tmp WHERE tx_date = tdate
ENDCASE

RETURN tmp.a
tmpVisit1 is generated from the ptt1 as follows:
SELECT distinct tx_date from ptt1 into cursor tmpVisit1 order by tx_date
However, the backcolor is changing according to tx_date?! what's wrong? Please help
Best regards,

Aaron Chu

********************************************************

Working with Visual FoxPro is a lot of FUN!

********************************************************
Next
Reply
Map
View

Click here to load this message in the networking platform