Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refresh My Grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00519080
Message ID:
00519089
Vues:
16
>Hello Everyone!!!
>I have a form that has a pageframe that has a grid.
>I have a button on the page that pulls information into a table called moneymove.dbf
>Every time the button is pressed I get a new result in my table. I want these changes to shown in my grid. I have never worked with a grid before, so I have no clue as to how to refresh the grid every time the table is refreshed.
>
>How can I get my grid to work?
>
>Thanks in advance

In the button click:
With ThisForm.PageFrame.Page1.Grid && use real control names
   local lcSource, laColumns[1], lnI
   lcSource = .RecordSource
   dimension laColumns[.ColumnCount]
   for lnI = 1 to .ColumnCount
       laColumns[lnI] = .columns[lnI].ControlSource
   endfor
   .RecordSource = ""
   * get new results in the table
   .RecordSource = lcSource
   for lnI = 1 to .ColumnCount
       .columns[lnI].ControlSource = laColumns[lnI]
   endfor
   .Refresh()
endwith
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform