Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Your class
Message
 
 
To
07/08/2000 10:01:04
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00401794
Message ID:
00401803
Views:
24
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform