Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Your class
Message
 
 
À
07/08/2000 10:01:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00401794
Message ID:
00401803
Vues:
25
>I want to insert the selected item into an array
>In your code where can i do that ?
>
>Thanks a lot

Hi Galia,

Just for clarification, I want to tell that it's about MultiSeletedGrid (because Cetin has bunch of other classes in Files section).

Suppose, you have a button on the form, which should populate an array of selected items in a MultiSelectedGrid.
1) Add array property to your form (say, aSelected)
2) In button click put this code:
   dimension thisform.aSelected[1] && Create first 'fake' element (initialized by .f.)
   local lnSelect, lnk, lnRecno
   lnk=0
   lnSelect=select()
   select (thisform.myGrid.RecordSource) && myGrid is multiselectedgrid
   lnRecno=recno() && Save record position
   scan for selected
     lnk=lnk+1
     dimension thisform.aSelected[lnk] && Redimension array
     thisform.aSelected[lnk]=MyField && MyField is from grid.recordsource
   endscan
   go lnRecno && restore record position
   select (lnSelect)
This is from the top of my head and untested, but should give you a start point.
HTH
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform