Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Asking for help again
Message
From
06/11/1998 11:08:00
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00154949
Message ID:
00155237
Views:
29
It should work. At least, it works on my machine. Did you call Grid.Refresh after SetAll ? Or, (some stupid assumption) is Italic available for the font you use in this grid?

>Hi Edward,
>
>I tried using the alias with the field name but that still didn't make it work.
>At first I put the setall statement in the form's init, then in the method that fills my cursor with my query(after the cursor is filled), but neither worked. There seems to be no way of having the iif(mycursor.myfield='data',.t.,.f.)validate each record in my cursor, and I can't use a scan/endscan since I'm using a setall command.
>I'll leave a clip of my line for you look at:
>with this.grdExample
> .setall('dynamicfontitalic',"IIF(myCursor.myField='somedata',.t.,.f.)","column")
>endwith
>If you spot what I might have done wrong, please let me know.
>Thanks
>Allen
>
>
>>>
>>>Hi all,
>>>
>>>I've been fumbling with this problem all day and I decided to ask for help.
>>>I have a grid with it's columns controlsources set to a cursor.
>>>When I populate the cursor from a query, I want to set certain rows to italics. It is dependent upon what the value of a field in my cursor is.
>>>Ok so I've realized that if I were to setup a dynamicfontitalic-setall statement in the init method and I was using a table in my data environment, it would be like this:
>>>thisform.grdMygrid.setall('dynamicfontitalic',"iif(my_field='cancelled',.t.,.f.)","column")
>>>
>>>BUT, my problem is that this doesn't seem to work when my field is not from a table but from a cursor. Can it be done?
>>>
>>>Thanks
>>>
>>>-------------
>>
>>Hi, Allen!
>>
>>It works the same way for table and cursor. You should use proper alias (mycursor.myfield) in setall expression.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform