Menu

#62 How to for browse not render (rows) of deleted records

v1.0_(example)
open
nobody
None
1
2023-09-06
2023-09-05
No

HI!
This prg demonstre the problem.

#include "hwgui.ch"
Function main
Local oDlg, oBrw
local aStru := {{"id"        ,"+",04,0},;
                {"name"      ,"C",40,0}}

set deleted on
DbCreate("mem:persons",aStru,,.T.,"per")

For n := 1 to 30
   per->(dbappend())
   per->name := "Name_"+strzero(n,4)
   if n>10
      delete
   endif
NEXT

per->(dbGotop())

   INIT DIALOG oDlg TITLE "Browse DBF" style DS_CENTER;
         AT 0, 0 SIZE 340, 500  ;
         FONT HFont():Add( "MS Sans Serif",0,-13 )

   @ 10,20 BROWSE oBrw DATABASE SIZE 200,420 STYLE WS_BORDER + WS_VSCROLL + WS_HSCROLL ;
         ON SIZE ANCHOR_TOPABS + ANCHOR_LEFTABS + ANCHOR_RIGHTABS + ANCHOR_BOTTOMABS 

     oBrw:Alias:="per"

     Add Column FieldBlock("id") to oBrw 
     Add Column FieldBlock("name") to oBrw editable

   ACTIVATE DIALOG oDlg
Return Nil

Best regards,
Itamar M. Lins Jr.

1 Attachments

Discussion

  • Alexander S.Kresin

    Should be fixed now.

    Regards, Alexander

     
    • Itamar M. Lins Jr.

      Hi!
      Still not resolved, problem persists.

      Best regards,
      Itamar M. Lins Jr.

       
      • Itamar M. Lins Jr.

        Hi!
        My fault! Disregard this message.
        I not put this lines:

             oBrwItens:bRcou := {|o| (o:alias)->(OrdkeyCount()) }
             oBrwItens:bRecnoLog := {|o| (o:alias)->(Ordkeyno()) }
        

        Best regards,
        Itamar M. Lins Jr.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.