Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to refresh grid after deleting last row?
Message
De
25/02/1998 02:37:15
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
24/02/1998 15:14:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00080896
Message ID:
00081008
Vues:
21
>My form contains document header (DOC database)
>ja document lines (DOCLINES database).
>
>Document lines are represented as grid in a page in a from by setting childorder, relationalexpr and linamaster properties in this grid.
>
>For compatibility reasons, I want do delete document line from on key label command. Deletion method looks like:
>
>in form's activate event:
>
>on key label ctrl+t do DELEROW
>
>in separate prg:
>
>proc DELETEROW
>push key clear
>... some code skipped
>delete
>if !eof()
> skip
> else
> if !bof()
> skip -1
> endif
> endif
>_screen.activeform.pageframe1.page1.grid2.refresh()
>pop key
>return
>
>If I try to delete last line of document which
>in physically last is DOCRID base, the grid will not refresh:
>cursor moves one line up, but deleted line remains visible !?!?
>
>I tried assigning recordsourde to itself by using
>_screen.activeform.pageframe1.page1.grid2.recordsource= _screen.activeform.pageframe1.page1.grid2.recordsource
>
>But then grid loses its relationalexpr propery and rewinds to beginning?
>Is this a foxpro bug (using 5.0a build 415) ?
Hi Andrus,
In proc delerow select the child table explicitly before deletion, then select the parent before return.
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