Information générale
Titre:
Grid column validation
Hello,
In grid.col.txt.valid I update the field of the underlying alias/table based on the value of another field in the same row. However I find that when I move up or down in this column or just move using cursor keys this columns value is updated for all rows with the value which should be updated only for the current row. Most cases this happens when I move from/to the first row of the grid and the value updated in the remaining rows is the value of the first row only. Here is an abstract of what I do :
gridJV.colxxx.txtxxx.valid
------------------
select DAlias && DAlias is the recordsource of the grid
RecNum=RECNO()
IF (QTY>0 AND CRAMT>0) OR (QTY<0 AND DRAMT>0)
val = QTY
WAIT WIND "Dr should have +Qty and Cr should have -Qty" NOWA
REPLACE QTY WITH val*-1
ENDIF
.gridJV.Refresh
GO RecNum && to reset the recno if changed
----------------------
What is wrong? TIA for any replies.
In debug window I find that there is another alias of the same table created in the DataSession window. Why does Grid create another alias when it is already in use?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement