Please try this sample
- Code: Select all Expand view
#include "fivewin.ch"
function Main()
local oBrw, oDlg
local nCol := 1
local nSkipCol
USE CUSTOMER NEW SHARED
DEFINE DIALOG oDlg SIZE 900,400 PIXEL TRUEPIXEL
@ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE "CUSTOMER" AUTOCOLS CELL LINES NOBORDER
nSkipCol := 3 // should be less than the last column number
WITH OBJECT oBrw
:lColChangeNotify := .t.
:bChange := { |brw,lColChange| OnChange( brw, lColChange, @nCol, nSkipCol ) }
//
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
return nil
//----------------------------------------------------------------------------//
static function OnChange( oBrw, lColChange, nCol, nSkipCol )
local oCol := oBrw:SelectedCol()
if oCol:nCreationOrder == nSkipCol
if oCol:nPos == 1 .or. oCol:nPos > nCol
oBrw:GoRight()
else
oBrw:GoLeft()
endif
else
nCol := oBrw:nColSel
endif
return nil
//----------------------------------------------------------------------------//
But normally there should not be such a requirement. If what is wanted is to skip some columns during fastedit, if oCol:bEditWhen evaluates to .T. or oCol:lReadOnly is .T. or oCo:nEditType is 0 (default) such columns are jumped over during fastedit.