Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing grids after table change
Message
De
02/12/1998 00:44:01
 
 
À
01/12/1998 19:18:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00163011
Message ID:
00163072
Vues:
26
>>Hi,
>>i have a grid on a form (nothing special) which reads a file with an alias ff. I then change that file programaticly by first closing the file using the use command like this:
>>
>>select ff
>>use
>>
>>and then open a new file by using
>>
>>use alltrim(substr(pfpsetup.filename,1,7))+"D" alais ff
>>
>>all the files have the same structer. Then i issue Thisform.grid1.refresh() and the grid goes blank.
>>
>>What am i doing wrong?
>>thanks in advance
>>
>>Quinn
>Hi Quinn.
>
>You might try this:
>
>Thisform.mygrid.recordsource = space(0)
>select ff
>use
>use alltrim(substr(pfpsetup.filename,1,7))+"D" alais ff
>ThisForm.mygrid.recordsource = 'ff'
>
>What is happening here is that you are ripping the grid's recordsource out from under it and the grid has a nervous breakdown. Setting the recordSOurce to space(0) keeps the grid from falling apart when you are doing this.
>
>Marcia

Thats Exactly how I do it. Not only is the grid intact with new data but any formatting, spacing or other properties are preserved for the next table.
You would be well advised, Quinn, to follow this advice rather than RE-setting ALL/Some of the grid properties!

Bernard
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform