Re: Re: TZF - Topaz8 and C++Builder6

"Kenneth Camargo Jr." <[email protected]>
Newsgroups gmane.comp.lang.delphi.topaz,gmane.spam.detected
Message-ID <[email protected]>
======= At 2003-02-08, 15:07:00 you wrote: =======

>Hi Kenneth: I am just getting started with c++Builder so bear with me. Here
>is my example.
> (...)
>What i have been doing is starting with a new project and clear form i add a
>topaz datafile[tzdbf1]and set dbf file as custequip.dbf(my file name).I then
>add another topazdatafile[tzdbf2] and set dbf file as custname.dbf(my file
>name).I now create a datasouce for each tzdbf and link them to each file eg
>[dbf1 linked to ds1] [dbf2 linked to ds2]. i now go to tzdbf1 and using the
>edit fields and creat a new field called lkcustname and set it to
>string,30char,lookuptype,nameno as field to use for lookup,tzdbf2 and file
>to lookup,nameno as field to use,name as the field to return.
>If i had both files set as active i get errors about cannot file to active
>file. If i leave the non active and try to set to active after i get a error
>NAMENO field not found.
>
= = = = = = = = = = = = = = = = = = = =

I don't think you can do that this way. Te TzGrid will only point to one dataset at a time. TzDbf tables do not support calculated fields (as lookup fields) IIRC, so either you programatically create a cell editor within a column that will point to the field in the other table, or use another data control to display the value you want, and set the filter property of the second table so that it will display the record corresponding to the key value that matches the first - You can use the SetFilterToCB() method, and write the corresponding callback function.
Another thing - don't use the field editor of the IDE to create your table layout. Instead, click on the "DbfFields" property of the Object Inspector, which will invoke Topaz's own field editor.
Myattempts to use TDataSet TFields property usually ended up pretty badly for me.

HTH,
Ken
-- 
Kenneth Rochel de Camargo, Jr. 
website:http://planeta.terra.com.br/educacao/kencamargo/

==^================================================================
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt
Or send an email to: [email protected]

TOPICA - Start your own email discussion group. FREE!
http://www.topica.com/partner/tag02/create/index2.html
==^================================================================
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.