>Hi, Folks,
> I found a very funny things about the grid AfterRowColChange Event, I wanna check the row changed or column changed by fllowing code, but when the first wait not remed and the 2nd remed, the result is quite right, but when the first remed and the 2nd not, the things changed. Whatever I move in row direction or move in column direction the message always pop out. That's why?
>
>Procedure Grid1.AfterRowColChange
>LPARAMETERS nColIndex
>LOCAL lsRow,lsCol,lsCol1
>lsRow=ALLTRIM(STR(this.ActiveRow))
>lsCol=ALLTRIM(STR(this.ActiveColumn))
>lsCol1=ALLTRIM(STR(nColIndex))
>*!*WAIT WINDOW "ROW:"+lsRow+"; Col:"+lsCol+"; Changed:"+lsCol1 NOWAIT
>IF lsCol1=lsCol
> WAIT WINDOW "OK" NOWAIT TIMEOUT 3000
>ENDIF
>DODEFAULT(nColIndex)
Unless you change the columnorders, column index (nColIndex) would be the same as activecolumn.
If you want to detect it 'after' row-or-column is changed :
*BeforeRowColChange
lparameters nColndex
this.Tag = str(nColIndex)
*AfterRowColChange
lparameters nColndex
wait window iif(val(this.Tag) # nColIndex,'Column','Row')+' changed'
Cetin