Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Link Between Grid, and Listbox
Message
De
14/01/2000 10:42:14
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
14/01/2000 10:02:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00318146
Message ID:
00318154
Vues:
29
>Hello to all,
>I have a cursor called gridCursor as the recordsource for my grid. I have a listbox in one of the columns, that displays data from a cursor called gridDist. There is a common field between these cursors called gridOrdernum. This field identifies a row uniquely in gridCursor, and it may refer to many records in gridDist.
>
>What I'm looking for, then, is for each row to display only the elements of gridDist, that match gridCursor.gridOrdernum for that given row. Right now, I tried the dreaded 'set filter to' and that would change the contents of the listbox to be the same in every row whenever I scrolled down to the next row of the grid (thusly changing to the next unique gridordernum in gridCursor!)
>
>Can anyone help me do this?


Set rowsource, rowsourcetype to default. Set rowsource to SQL in init and requery at entry.
*Init
lcSQL = "select myListBoxFields "+;
"  from  gridDist "+;
"  where gridOrderNum = gridCursor.gridOrderNum "+;
"  into cursor crsListBox"
with this
  .RowSourceType = 3 && SQL
  .RowSource = lcSQL
endwith

*Gotfocus
this.requery()
Cetin
Ç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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform