With Xbrowse i select the colums that I want to update in a second database (fieldnames are identical)
For the selecting of colums i use Mr. Rao's function : XbrColselector(oBrw)
Now it would be nice If I could klik a button or so that only the selected colums are updated . (many times the selection can be different)
Always the field 'Code' will be used as seek parameter in the second database.
- Code: Select all Expand view
function XbrColselector(oBrowse)
local oDlg, oBrw
local aSave := aCopy( oBrowse:aCols )
DEFINE DIALOG oDlg SIZE 300,400 PIXEL TRUEPIXEL
@ 60,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE oBrowse:aCols ;
COLUMNS "lHide", "cHeader" ;
HEADERS "", "Header" ;
COLSIZES 40, 100 ;
CELL LINES NOBORDER
WITH OBJECT oBrw
:nStretchCol := 2
WITH OBJECT :aCols[ 1 ]
:bEditValue := { |x| If( x == nil, !oBrw:aRow:lHide, oBrw:aRow:lHide := !x ) }
:SetCheck( nil, .t. )
:nHeadBmpNo := 2
END
:CreateFromCode()
END
@ 20,180 BTNBMP PROMPT "Close" SIZE 100,30 FLAT PIXEL OF oDlg ACTION oDlg:End()
@ 20,80 BTNBMP PROMPT "ALL" SIZE 100,30 FLAT PIXEL OF oDlg ACTION (AEval( oBrowse:aCols, { |o| o:lHide := .f. } ),oDlg:End() )
ACTIVATE DIALOG oDlg CENTERED
oBrowse:Refresh()
return nil
[code]
function +
local oDlg, oBrw
local aSave := aCopy( oBrowse:aCols )
DEFINE DIALOG oDlg SIZE 300,400 PIXEL TRUEPIXEL
@ 60,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE oBrowse:aCols ;
COLUMNS "lHide", "cHeader" ;
HEADERS "", "Header" ;
COLSIZES 40, 100 ;
CELL LINES NOBORDER
WITH OBJECT oBrw
:nStretchCol := 2
WITH OBJECT :aCols[ 1 ]
:bEditValue := { |x| If( x == nil, !oBrw:aRow:lHide, oBrw:aRow:lHide := !x ) }
:SetCheck( nil, .t. )
:nHeadBmpNo := 2
END
:CreateFromCode()
END
@ 20,180 BTNBMP PROMPT "Close" SIZE 100,30 FLAT PIXEL OF oDlg ACTION oDlg:End()
@ 20,80 BTNBMP PROMPT "ALL" SIZE 100,30 FLAT PIXEL OF oDlg ACTION (AEval( oBrowse:aCols, { |o| o:lHide := .f. } ),oDlg:End() )
ACTIVATE DIALOG oDlg CENTERED
oBrowse:Refresh()
return nil
[/code]