Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing - revisited
Message
De
14/04/2003 12:46:46
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00777260
Message ID:
00777288
Vues:
12
>Ok- now I need to perform a slightly different REFRESH()...
>
>How can I (manually, via a command button) refersh the data in a grid?
>ALl of the database opening and querying is performed in the form's LOAD() method. Here's what I have at the moment, in a command button's CLICK() method:
>
> ThisForm.LockScreen = .T.
> ThisForm.Load()
> ThisForm.grdToday.RecordSourceType = 1
> ThisForm.grdToday.RecordSource = "today.dbf"
> ThisForm.Refresh()
> ThisForm.LockScreen = .F.
>
>What happens at this point- when the Refresh buton is clicked- is that the grid goes blank. The other command buttons operate normally - the navigation buttons, an editing button, etc.- but I can't see any data. How can I fix this?
>
>My thanks in advance.
>
>Henry

Henry,
-Move database querying to a custom method.
-Before query/requery :

ThisForm.grdToday.RecordSource = ""
* Query
ThisForm.grdToday.RecordSource = "today.dbf"

Alternatively (and better IMHO) use an SQL rowsourcetype.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform