Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to re-create all columns in grid
Message
De
18/09/2001 15:01:38
 
 
À
18/09/2001 14:04:13
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00556193
Message ID:
00558043
Vues:
33
>>>>I don't want to change grid recordsource. I want only to add new columns to grid. Currently I use the below. I read your article but haven't found any hind how to change this code.
>>>>I found that C5 error occurs ONLY if grid contains combobox. If grid contians only textboxes, c5 error does't occur.
>>>
>>>Just an idea, and you may not like it, but IMO grid rebuilding is time consuming and tricky process. Why don't you have three or four grids and keep all but one hidden? Show the one you need at any particular moment. Even if you build them on the fly, build them only once. Have a reference of each of the grids in their container's (form, page, whatever) array property (take care at .destroy, but you know that). At least when switching between grids you wouldn have them flip almost instantaneously.
>>
>>My customers require that they can yourself add columns to grids.
>>Currently this can be done simply by adding rows to grid description table.
>>
>>Using youre recommendation, they must by VFP and learn programming.
>>Is'nt it a bit difficult ?
>
>Actually no - each time you take a new selection from this grid description table, build a new grid in a new container. You can class the container to have all the code you need. Hide other containers and show the new one. In other words, if destrozing columns won't work, just hide the previous grid and build a new one.

This is a nice idea! However, this decreases form load speed a lot.
It is possible to implement it so that form load and program startup speed will not decrease ?

In VFUG newletter, there was an article by Vladimir Zevtsheno about using
timer to remove columns from Grid. This article says that direct removeobject()
causes VFP 5 GPF and recommends to remove column using timer.
However, I have no idea how to use timer in this situation.
Andrus
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform