VOTools for Visual Objects  
and Vulcan.NET  

bBrowser => Tips & Tricks => How to delete the selected records    




 from bBrowser
1.4
  bBrowser 1.4 (Limited)
no
 

How to delete the selected records

While deleting the selected records it is necessary that the notifications from the data server is suspended. Otherwise with the first record movement the selection is removed by the bBrowser. The selected records can be determined with the methods bBrowser:SelectionFirstRow() and bBrowser:SelectionNextRow().

The following code fragment demonstrates the proceeding:

  LOCAL oServer   AS DBServer
LOCAL iRecNo    AS INT

oServer := oBrowser:Server
oServer:SuspendNotification()

iRecNo := oBrowser:SelectionFirstRow()
WHILE iRecNo>0
  oServer:Goto(iRecNo)
  oServer:Delete()
  iRecNo := oBrowser:SelectionNextRow()
END

oServer:GoTop()
oServer:ResetNotification()
oServer:Notify(NOTIFYFILECHANGE)

Copyright © 2003-2015 BEFO GmbH