Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DynamicBackColor not working
Message
 
À
28/10/2008 13:50:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01357721
Message ID:
01357776
Vues:
21
>>>>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
>>>>
>>>
>>>Maybe your expression is too long? And why all the alltrims? I have shortened it a bit:
>>>
>>>THISFORM.Fm_Container1.grdWorkListXMLCursor.SetAll("DynamicBackColor", ;
>>>   "ICASE(UPPER(GroupHeading) == [RECEIVER], RGB(192, 241,190),
>>>   INLIST(UPPER(GroupHeading), [SUBSCRIBER], [DEPENDENT]),  RGB(211,210,240),
>>>   RGB(249,223,223))",'Column")
>>
>>The ALLTRIMS() is becuase
>>
>>CREATE CURSOR crsTest (Fld1 C(20))
>>INSERT INTO crsTest VALUES ([Receiver])
>>? UPPER(crsTest.Fld1) == [RECEIVER]
>>? UPPER(ALLTRIM(crsTest.Fld1)) == [RECEIVER]
>>
>>:-)
>
>To rephrase my questions: Are the alltrims really necessary? All too often I see alltrim used where it causes more problems than it solves.
>
>CREATE CURSOR crsTest (Fld1 C(20))
>INSERT INTO crsTest VALUES ([Receiver])
>? UPPER(crsTest.Fld1) = [RECEIVER]
>? UPPER(ALLTRIM(crsTest.Fld1)) == [RECEIVER]
>
>
>NB! I realize that my line should be
>THISFORM.Fm_Container1.grdWorkListXMLCursor.SetAll("DynamicBackColor", ;
>   "ICASE(UPPER(GroupHeading) = [RECEIVER], RGB(192, 241,190),
>   INLIST(UPPER(GroupHeading), [SUBSCRIBER], [DEPENDENT]),  RGB(211,210,240),
>   RGB(249,223,223))",'Column")
That code will depends of what is your current SET EXACT :-)
I know, I know, most of the times SET EXACT is OFF :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform