form初始化:
PUBLIC
plRowMove
plRowMove=.T.
IF NOT USED("表")
USE 表 IN 0
ENDIF
SELECT 表
SET MULTILOCKS ON
= CURSORSETPROP('Buffering', 5, '表' )
grid的afterrowcolchange:
LPARAMETERS nColIndex
lMov = .F.
IF ThisForm.nWhatRow # This.ActiveRow
ThisForm.nWhatRow = This.ActiveRow
nHold= RECNO()
GO ThisForm.nRecNum
cChange = GetFldState(-1,'表')
IF AT('2', cChange)>0
This.Refresh
lMov = .T.
IF MessageBox("确定要修改吗?",4)= 6
=TableUpdate(.T.)
ELSE
=TableRevert(.T.)
ENDIF
ENDIF
GO nHold
IF lMov
This.Refresh
lMov =.F.
ENDIF
ENDIF
grid的beforerowcolchange:
LPARAMETERS nColIndex
ThisForm.nRecNum = RECNO()
IF
(THIS.RowColChange=1
OR
THIS.RowColChange=3)
AND
plRowMove=.F.
NODEFAULT
ENDIF