Re: Show non-table value inside grid by Jeff
Jeff
Fri May 13 14:37:55 CDT 2005
This is a great solution. Do you think it will work for dynamicbackcolor and
dynamicforecolor as well?
I have a table whose data is shown in a grid. It is related to another table
using SET RELATION and the data in this second table is used to set the
DynamicForeColor and DynamicBackColor on some of the column.
This works perfectly on some workstations, ok on others, and not at all on a
few workstations. Lets say the table being gridded is A and the related
table is B. I'll have a DynamicForeColor set to
iif(B.Logical, RGB(whatever), RGB(whatever))
I certainly could make a function that returns B.Logical and then code
iif(BFunc(), RGB(whatever), RGB(whatever))
Is there any reason to believe that this will have fewer problems?
Thanks,
Jeff
"Alan C. Sheffield" <asheffield @ park west gallery.com> wrote in message
news:%231ARjcwVFHA.3584@TK2MSFTNGP10.phx.gbl...
> I'll use an example for looking up a employees name.
> browse is on a cursor named curAssignments
> Employees are in the table Employees
>
> 1) create a form method called getEmployee()
> 2) in that method place the following code
> if seek(curAssignments.iempid,[Employees],[iid])
> lcReturn = alltrim(employee.clastname)+employee.cfirstname
> else
> lcReturn=[]
> endif
> retrurn lcReturn
> 3) place "thisform.getName()" as the controlsource of the column for the
> employees name.
>
> Alan
> programmer
> Park West Gallery
>
>
> "Nuyttens Xavier" <xavier@cpsit.be> wrote in message
> news:MmEge.88623$3l4.5356598@phobos.telenet-ops.be...
>> Hi all,
>>
>> I've had this question for long, but haven't found a solution in VFP8, I
>> wonder if maybe VFP9 can do something extra.
>>
>> I have a table with some data that I want to show in a Grid. However the
>> data has codes like "F" for Phone, "X" for Fax, etc. This information is
>> stored in a 2-dimensional Array (discription, code). I'd like to show the
>> actual discription instead of the coded value in the grid ofcourse. I
> can't
>> figure out how to do it in VFP 8 without creating a cursor for it. Also
> I'd
>> prefer not using combo-boxes cause they make the grid alot "heavier" to
> look
>> at, but even with Comboboxes I didn't find a working solution. Can
>> anybody
>> help with this ?
>>
>> thankx !!
>> Xavier, CPS
>>
>>
>
>