Information générale
Catégorie:
Codage, syntaxe et commandes
Jim Booth had a great reply on this topic in the last few days. His
response went into more details as to why it is happening. There are
two solutions to this issues beyond what has been stated:
1.) Use a paramterized view instead of a cursor.
2.) Set all the properties of the grid by calling a method to reset
everything.
Hope this helps...
>>Let's say you initially create a cursor and set it as the recordsource
>>of the grid. Once you run a query to repopulate the new cursor you
>>have temporarily lost control of the cursor and it can bring back
>>any type of structure. By setting it to "" between queries VFP takes
>>no action and then when the cursor is reset with the same structure all
>>is well. At least that sounds good to me and is close to what is happening.
>>
>>>That worked like a charm...but why do you have to set the recordsource to "" in order to make it work?
>>>
>>>>Use a view and requery or do the following:
>>>>
>>>>grid.recordsource = ""
>>>>*-- run query
>>>>SELECT statement into cursor xx
>>>>grid.recordsource ="xx"
>
>Tom,
>I am having the same problem. My SELECT returns the right information and displays it properly. However, all settings of the grid (Header Name, Columnd widths, colors, etc.) are reset to some default values when the grid refreshes.
>
>Any ideas would be appreciated,
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement