Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Yet another grid refresh question
Message
De
09/02/2006 11:41:47
 
 
À
09/02/2006 11:19:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Divers
Thread ID:
01094306
Message ID:
01095090
Vues:
12
James

I got the gist that your grid holds values from more than on table, e.g. group ID from one table and the Group name and details from the Group look-up table.

A view is essentially the resultant cursor of an SQL statement, looking across tables, and thus can be treated as a flat table in its own right, and can be the source to a grid. So you could dispense with these relationships (I'm not sure that can work too well in a grid anyway, and I've certainly never had such a set-up in a grid)

Setting up a view is quite simple and intuitive via the View Designer (similar to the QBE grid in Excel)

You MAY have a "yankee screwdriver" in your hand but you don't want a sledge for panel pins, or tack hammer for floorboard brads.

Now then, I see you've only free tables and, yes, views can only be built on database tables. Is there any reason why you're not using a database?

Terry

>
>I don't know whether a view would be appopriate or not. I have no experience at all with views, nor knowledge of them. I don't know anything about why they would be better or worse than what I'm currently doing.
>
>This is only due to ignorance. I know how to use grids, and can do lots of things quite quickly with them. A friend of mine has an expression, "If you have a hammer in hand, everything looks like a nail." So, I know how to use grids, and I use them a lot.
>
>I haven't used views, but I have a foggy recollection of dismissing them outright when investigating them a long time ago. Do they have to do with databases or something? All of my tables are free-standing tables.
>
>
>
>>James
>>
>>Would a view not be appropriate as the source for the grid?
>>
>>Terry
>>
>>>I have a grid with a few columns where I'm having a problem with the (desired) refresh of two of the columns.
>>>
>>>The column has a group-ID in it, and the user can change it (as a combobox, but I use sparse=.T. so that the drop-down arrow only appears when the cell has focus).
>>>
>>>The grid's cursor has a relation set to another table, where there are other fields from the group-ID. Two of these fields (name and phone) appear as adjacent columns in the grid. When the user changes the group-ID, I'd like columns with the group-name and group-phone to change as well. However, this doesn't happen (unless I move the record off the screen and then return to it).
>>>
>>>What am I missing?
>>>
>>>Thanks
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform