Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid after changing underlying data and refreshing
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00392607
Message ID:
00392620
Vues:
11
Before you do anything to the underlying data that drives the grid you have to set the grid's recordsource = '' . Then mess with the data, then set the recordsource back, or to another table.

>I have a simple grid on a form. The RecordSource is a file called 'purge.dbf'. I am trying to use the same grid and same form to display 2 differents sets of data (same table and table structure). I create the table initially on load (calling a user method). It is created via a SELECT - SQL command using INTO DBF 'purge'. I then alter the table to add an additional logical field. This field is represented by a checkbox on the grid.
>
>Once in the form the user should be able to toggle between two different sets of data (again, with the same fields just different data) by using a graphical radio button.
>
>Now everything works fine of the purge table is static and I open it on load. The grid captions are correct and the checkbox appears on each row. But, when I use the select method the columns lose their headings and the checkbox is no longer there although the field that it represents is.
>
>I know this has something to do with the recordsource but I have not been able to figure it out. In general terms, I take these steps:
>
>1. Select the data into a dbf (which is the recordsource of the grid).
>2. alter the dbf adding a logical field
>3. refresh the form and the grid recordsource:
>
>WITH THISFORM
> .REFRESH()
> .Grid1.RecordSource=THISFORM.Grid1.RecordSource
>ENDWITH
>
>Any ideas what I am doing wrong?
>
>TIA,
>George
Rip Ryness
International Falls, MN
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform