>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