Can we change the status of aSelected?
The idea is that I call several functions (one by one) with a different ordscope() selection. The result records of that selection should be set to .t. in de aSelected
Next again a ordscope with other results, but these also need to be set .t. in aselected.
etc...
Finaly all selections are made and oBrw:aSelected contains all record from different searches/selections.
redraw of xbrowse should show all the records in aSelected.
Change oBrw:aSelected outsite xbrowse
- Marc Venken
- Posts: 1485
- Joined: Tue Jun 14, 2016 7:51 am
- Location: Belgium
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: Change oBrw:aSelected outsite xbrowse
Purpose of oBrw:aSelected is totally different.
What you want is you prepare an array of record numbers, which you want to show in xbrowse.
In this sample, aRecs represent the array aSelected you are referring to:

What you want is you prepare an array of record numbers, which you want to show in xbrowse.
In this sample, aRecs represent the array aSelected you are referring to:
Code: Select all | Expand
#include "fivewin.ch"
function Main()
local oDlg, oFont, oBrw
local aRecs := { 3, 10, 20 }
USE STATES
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 400,300 PIXEL TRUEPIXEL FONT oFont ;
TITLE "FILTER BY ARRAY"
@ 80,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE "STATES" ;
COLUMNS "RECNO()", "CODE", "NAME" ;
HEADERS "REC" PICTURES "999" ;
CELL LINES NOBORDER ;
ROWS aRecs
oBrw:CreateFromCode()
@ 20,20 BUTTON "CHANGE RECORDS" SIZE 200,40 PIXEL OF oDlg ;
ACTION ( oBrw:aArrayData := { 3, 10, 20, 7, 23, 47 }, oBrw:Refresh() )
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil

Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Marc Venken
- Posts: 1485
- Joined: Tue Jun 14, 2016 7:51 am
- Location: Belgium
Re: Change oBrw:aSelected outsite xbrowse
Thanks for sending me in the correct direction !!
In every lookup function (afther selection)
I will add records to the array with a dbeval(....aadd()..)
In every lookup function (afther selection)
I will add records to the array with a dbeval(....aadd()..)
Marc Venken
Using: FWH 23.08 with Harbour
Using: FWH 23.08 with Harbour