Code: Select all
function xbrindialog( alin )
local odlg, obrw
define dialog odlg size 640,440 pixel
@ 10,10 xbrowse obrw ;
fields str(alin[obrw:narrayat][1],2), ;
alin[obrw:narrayat][2], ;
alin[obrw:narrayat][3] ;
headers 'cod','description','cd' ;
size 300,200 pixel of odlg
// at this stage the columns are arleady defined
obrw:setarray(alin) // now setarray erases all the column defs
obrw:createfromcode()
activate dialog odlg centered
return nil
Code: Select all
if empty( ::acols ) // NEW
::aCols := {}
for nFor := 1 to len( aData[ 1 ] )
< ........... code ......... >
next
endif // NEW