Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to prevent a grid-layout-change?
Message
De
22/10/1998 12:21:26
 
 
À
22/10/1998 10:51:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00149410
Message ID:
00149476
Vues:
23
>>Hello,
>>
>>I am using Visual FoxPro 6.0 and I am working on a search-form with textboxes, a button and a grid. The textboxes are used to enter the search-values and the button is activating the search-method. The results of the search must come in the grid. The grid has no recordsource and the columns don't have controlsources when the form is activated for the first time.
>>
>>When I fill in the textboxes and push the search-button a SELECT-command is being executed. The results of the SELECT-command will be stored in a cursor. The SELECT-command is as followed:
>>
>>SELECT <...> FROM <...> INTO CURSOR WHERE <...>
>>
>>After the SELECT-command the following property will be changed:
>>
>>THISFORM.gridname.RecordSource = "cursorname"
>>
>>The first search is correct. When I push the search-button for the second time, the grid is completely changed. The headers will get the names of the cursor-fields and the sizes of the columns are changed too. Is there a way to keep the grid the way I designed it?
>>
>>Thank you in advance.
>
>You hit usual grid's reaction when its recordsource-cursor is overwritten. There are two ways to go around this problem:
>1. You store grid properties and restore them programmatically after each SELECT.
>2. You don't overwrite grid.recordsource. Instead of this you SELECT records to another cursor or array and then use APPEND FROM ... or INSERT ... From Array ...

Thank you for your answer!
Greetings,

Afier Appelman
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform