Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DynamicBackColor not working
Message
 
 
To
28/10/2008 12:13:00
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01357721
Message ID:
01357723
Views:
30
>The records do not change color in the grid, though the cursor does have those values in the GroupHeading field.
>
>	.Fm_CONTAINER1.grdWorkListXMLCursor.RecordSource = ''
>	.Fm_CONTAINER1.grdWorkListXMLCursor.RecordSource = 'WorkListXMLCursor'
>	THISFORM.Fm_Container1.grdWorkListXMLCursor.SetAll("DynamicBackColor", ;
>		"IIF(ALLTRIM(WorkListXMLCursor.GroupHeading)='Receiver', RGB(192, 241, 190), ;
>		IIF(ALLTRIM(WorkListXMLCursor.GroupHeading)='Subscriber' OR ;
>			ALLTRIM(WorkListXMLCursor.GroupHeading)='Dependent', RGB(211, 210, 240), ;
>		RGB(249, 223, 223)))", "Column")
>	.Fm_CONTAINER1.grdWorkListXMLCursor.Refresh
>
Try to use ICASE function here, it would be more readable. Or go with the custom form method instead.

Also where do you call this method? It should be done once in form's Init and you don't need to call Refresh().

Finally, can you just use safe select technique here?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform