Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid confusion
Message
De
24/01/2002 06:38:47
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
23/01/2002 13:19:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00609174
Message ID:
00609574
Vues:
17
This message has been marked as a message which has helped to the initial question of the thread.
David,
In addition to what Sergey said I think you made typo in your expressions - parentheses mismatch (no error ? - grid should go blank then) :
"( iif(seek(master1.text1id, 'table1', 'textid'), table1.description, '') )"
Also you don't need bound = .f.
with thisform.mygrid
 .recordsource = ''
 .recordsource = 'master1'
 .Columncount = 2
 .Columns(1).ControlSource = ;
"( iif(seek(master1.text1id, 'table1', 'textid'), table1.description, '') )"
 .Columns(2).ControlSource = ;
"( iif(seek(master1.text2id, 'table2', 'textid'), table2.description, '') )"
endwith
Cetin

>My grid's recordsource contains only the foreign keys but when the grid runs it looks up the descriptive text from other tables and displays this instead. It's done using the following code.
>
>grid.recordsource = 'master1'
>grid.columncount = 2
>
>grid.column1.bound = .f.
>grid.column1.controlsource = (iif(seek(master1.text1id, 'table1', 'textid', table1.description, '')))
>
>grid.column2.bound = .f.
>grid.column2.controlsource = (iif(seek(master1.text2id, 'table2', 'textid', table2.description, '')))
>
>My problem seems to occur when I store this stuff in a table. I have a table that stores control properties (the actual property name text) and their values. The control property and their values that need to be set in order for the grid to work like your above example are store in this table (one line in the table for each property and value). When grid runs a procedure scans through this table and macro substitutes the data which sets up the grid. This program technique works very well except in this case. When the grid runs each column contains the same descriptive text even though the grid's recordsource table contains a variety of values. Why doesn't the grid display the proper descriptive text?
>
>Thanks in advance for any help.
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform