Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mark column whith checkbox in a grid
Message
 
À
06/06/2001 17:11:19
Ing. T.R.M. Pluym
Pluym Elektronics Bv
Hulst, Pays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00516061
Message ID:
00516081
Vues:
14
>I'm working to make a grid for an application, where I can select some records by clicking a checkbox in a grid. I figured out how to put a checkbox in a grid.
>Now i want an array containing the recordnumbers i have ticked in the grid. When I de-tick a checkbox in the grid i whant to remove the record number from the array. But when I bind:
>
>=iIf( ASCAN( aRecs, RecNo() ) = 0,.F.,.T.)
>
>to the controlsource of the checkbox column the grid blanks when I want to run it. What's wrong and how can i solve it ?

Well, I would add an integer field to the table and bind the checkbox to that field. Add an index for that int field. Then when you are ready to take some action based on the boxes that are checked, set index to the int field and scan the table and check for a value of 1 in the field bound to the checkbox.

That's one way, another would be to reset your array using the same method each time a box was checked. The problem with using recno() is all the different scenarios involving the record pointer.
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform