i try to edit an array value from a xBrowse.
But i can't see the post edit value.
Do i miss something?
Here my code
Code: Select all
REDEFINE XBROWSE oBrw ID 10 OF oDlg;
ARRAY aArtGrp;
COLUMNS 1, 2, 4;
HEADERS "Art.Grp.", "Name", "Target";
SIZES 50 , 120 , 90
WITH OBJECT oBrw
:lKineticBrw := .f.
:nMarqueeStyle := MARQSTYLE_HIGHLROW
:oCol( "Target" ):nEditType := EDIT_BUTTON
:oCol( "Target" ):addResource( "qty" )
:oCol( "Target" ):nBtnBmp := 1
:oCol( "Target" ):bEditBlock := { || GetNewTarget( oBrw, cKdNr, @nRet ) }
END
...
STATIC PROCEDURE GetNewTarget( oBrw, cKdNr, xnTarget )
LOCAL oDlg
LOCAL nTarget := 0, oTarget
DEFINE DIALOG oDlg RESOURCE "GET_TARGET"
REDEFINE GET oTarget VAR nTarget ID 20 of oDlg PICTURE "@E 9999999"
ACTIVATE DIALOG oDlg CENTERED ON PAINT oTarget:SetFocus()
if oDlg:nResult == ID_OK
do while !tgt->( dbAppend() ); enddo
tgt->kdnr := cKdNr
tgt->artgrp := left( cArtGrp, 3 )
tgt->target := nTarget
tgt->( DbUnLock() )
xnTarget := nTarget
endif
oBrw:Refresh()
oBrw:SetFocus()
RETURN
Detlef