Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't get the deleted record to go away in the grid.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00002696
Message ID:
00002702
Vues:
27
>>That Refresh method only repaints the control, it
>>doesn't update the data. Call the =REFRESH()
>>function or the =REQUERY() function. Of course
>>this does depend upon your use of views to
>>populate these grids.
>
>This will remove the record just just delete from
>the grid. This code is executed from the delete
>button which is beside the grid. This.Parent.cGrid
>is a property containg the name of the grid. For
>example: ThisForm.MultiplePages.Page2.ClientGrid.
>By resizing the grid temporary to its headerheight
>and back again to its normal size will referesh
>the grid for good. Don't forget to put
>ThisForm.LockScreen to .T. before refreshing and
>back to .F. after.
>
>* Refresh grid
>STORE EVALUATE(This.Parent.cGrid+".HeaderHeight")
>TO lnOldGridHeaderHeight
>=EVALUATE(This.Parent.cGrid+'.SetFocus()')
>STORE EVALUATE(This.Parent.cGrid+".Height") TO
>(This.Parent.cGrid+".HeaderHeight")
>STORE lnOldGridHeaderHeight TO
>(This.Parent.cGrid+".HeaderHeight")

Deleting a record from a grid:
I guess I'm missing the point, you surely don't have to go through all that just to make the record disappear after deleting it from the grid do you? In the Tasmanian Traders app, it gets deleted right away, and I didn't see all this extra code in there. Like I said, I can leave the form, come back in, and it will be gone.
** ** ** ** ** ** ** ** ** ** **
Gregory Cummines
Visual FoxPro 3.0/5.0
C/C++ Applications
** ** ** ** ** ** ** ** ** ** **
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform