Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Line Item Grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00135368
Message ID:
00135380
Vues:
10
Hi Dan,

Drop the grid object on your form. Specify the number of columns in the ColumnCount property. The grid can contain column object and each column object can further contain a header and other data entry controls like textbox, editbox, combobox etc. When you set the ColumnCount property of the grid to say 3, 3 column objects are added to the grid and the textbox is defaulted to each column as the data entry control.

To get data in the grid, You need to specify the RecordSource property of the grid i.e. this will be your table alias. Then in each column specify the ControlSource which will indicate which field needs to be displayed in each column. You can even specify expressions as ControlSource of a column. e.g. something like Quantity*Price and this column will automatically become ReadOnly.

To add something like a combobox in a grid, select the grid and right-click on it. Select Edit. Click on the column you want to add the combobox and from the form's toolbar drop the combobox in that column. When you see the properties window now, you'll see that the column in which you added this new control, will have the default textbox as well as your combobox. You can either remove this textbox, by selecting it from the properties window, then click on windows and select your form name and hit delete. If you want to leave it there then you can change the CurrentControl Property of the Column to the combobox you dropped.

Making the settings for the combobox will be another excercise. Let me know when you are ready...

>Problems??/ hmmm... try starting with creating the grid! I am very very new to grids... nothing works like the book says its susposed to (for me!)...
>Advice from ground level??
>Thanks
>Dan
>
>
>
>>Hi Dan,
>>
>>The only difference I see here is that you have an extra part number which the user will enter. You'll probably perform a seek on it to make sure the right part number exists and replace the description and quantity.
>>
>>Do you want a combo for part numbers? What kind of problems are you getting?
>>
>>>I have been attempring to re-create a part of one of the samples (Tas Traders) included in VFP5, but to no success.
>>>
>>>I want to create a grid on a 3 page form (on the 2nd page) that will allow me to enter parts information. ie: fields like QTY, Part_no,
>>>Description and cost ( these 2 dervied from a parts table based on part_no) and Extended cost ( Qty * cost).
>>>
>>>Add and Edit and Delete Command buttons on the page would be nice too.
>>>
>>>Can anyone get me started in the right direction??
>>>
>>>TIA, Dan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform