Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 5 Grid Not Refreshing
Message
De
11/12/2001 03:33:52
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00592329
Message ID:
00592547
Vues:
18
>I have a grid in VFP5 which uses a free table (alias) as its source.
>The buffer override is '5' - optimistic table buffering.
>This alias is opened in the environment with an order.
>One of my command buttons on the same form is 'move down' which basically moves this record down and the following record up in the grid. This is done by replacing a field on both records which is also the order of the table.
>I have tried refreshing the grid and the form, however, the grid is still displayed in the original sequence. I know that the records have actually switched position because I have browsed the table in the command button.
>When I modify the buffer modem override in the environment to '0' - no buffering, the data in the grid is displayed properly.
>Thank you for any assistance.

Allan,
A plain refresh by itself is not sufficient. Go recno() to enforce a refresh :
with ThisForm.myGrid
 lnRec1 = recno(.recordsource)
 skip in (.recordsource)
 if eof(.recordsource)
  skip -1
  return
 endif
 replace sorter with sorter-1 in .RecordSource
 go lnRec1
 replace sorter with sorter+1 in .RecordSource
 go recno() in .recordsource
 .Refresh
endwith
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