Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create an array. Help me!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00361252
Message ID:
00361272
Vues:
16
>Hello all,
> I have been working with VFP not long ago so I don't know much about it and especially with array. Please help me if any of you know the answer!
> I am working on a form that has a grid, a combo box, and a button. The first column(of the grid) is Serial No. of on_hand items in the Inventory. The purpose of this form is to move items to co_locations(in other states) of the company.
> When I run the form, the grid will display all onhand items(with item name, received date to the inventory...) and I would like to create an array for all serial no.(the grid's first column) and store it under the combo box. If so, then I just click on the combo box to choose the item which has that particular serial no and go from there. But I don't know how to create an array like that.
> Any body please help me out!
> Thanks in advance.
> Thanya.



Thanya, probably can use RowSourceType = 3 - SQL Statement and then just issue
in grid.AfterRowColChange()

this.columnX.cboSerialNo.Requery()
this.columnX.cboSerialNo.Refresh()

Using the array is similar, it just needs extra code with the same end result
But if by some reasons you have to fill the array manually you may try the following:

Create an array property for your form (Menu/Form/New Property
and type something like myComboArray[1]. Then you can set the combo.RowSourceType 5 - Array, and combo.RowSource to thisform.myComboArray
In grid.AfterRowColChange() you can redimension your array and fill it with proper info somehow, then
this.columnX.cboSerialNo.Requery()
this.columnX.cboSerialNo.Refresh()

This is not tested right now, but it should get you an idea.

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform