PRB: Values Are Not Updated in Each Column When Changing Rows (141987)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
This article was previously published under Q141987 SYMPTOMS
Changing the ActiveRow of a grid does not update the values of the object
in every column.
CAUSE
Only the object that receives the focus will have an updated value.
WORKAROUND- Create a new property of the form named oldrow and assign an
initial value of -1.
- Place the following code in the grid's AfterRowColChange event:
******* Begin AfterRowColChange *********
IF This.ActiveRow<>Thisform.oldrow
Thisform.oldrow=This.ActiveRow
FOR lnI=1 TO This.ColumnCount
lcsource=This.Columns(lnI).ControlSource
IF TYPE(lcsource)<>"G" AND TYPE(lcsource)<>"M"
This.Columns(lnI).SetAll("VALUE",&lcsource)
ENDIF
ENDFOR
ENDIF
******** End AfterRowColChange *************
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 9/30/2003 |
---|
Keywords: | KB141987 |
---|
|