Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I base a grid on an array?
Message
De
29/04/1999 11:44:54
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
29/04/1999 11:04:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00213274
Message ID:
00213512
Vues:
46
>>No, but you can create a cursor from the array, and base the grid on that (I didn't see the other thread... what are you trying to do?)
>
>I have a form where clerks enter new debit and credit items to an account. A child grid on this form shows all of the items or just the open items as desired. The grid is based on a parameterized view. I have been asked to show a running balance down the right side of the grid. "No problem!", I said.
>
>Stephen Russell takes the approach that I first imagined: adding a blank field to the view and calculating it with a scan loop. I'm still unsure about this approach.
>
>Because I will need an array to calculate which items gets closed when a payment is made, I'm inclined toward using an array and then transfering it to a temporary cursor as you and Jeff have suggested.
>
>Question for Jeff: If I make sure that the cursor fields are in exactly the same order as the grid columns can I skip the code:
>
>MyGrid.Column1.ControlSource = "MyArray[DUMMY.Du_rec,1]" etc.
>
>
>Thanks for the help.
>
>Peter
Peter,
Stephen's suggestion is a way. Second adding a "calculated column" is another way.
Stephen's suggestion is better IMHO because you initialize the values once via a scan..endscan and change only the records that are current and below in the grid as credit or debit changes.
Both approaches were fast in FP2.x so should be better in VFP.
Managing an array seem harder (to me of course).
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