>In a grid I want the user only to change the row. Except when the user presses the INS key (edit the line).
>I use the NODEFAULT entry to prevent the COLUMN change. The problem is the users cannot change the row also. So is there any way to figure out within the BeforeRowColChange event whether the user is changing the row or column. The nColIndex parameter in that event is supposed to indicate the new row/column according to VFP help description. But it is indicating only the current column.
Yes nColindex returns the current column's index.
If mdown()
lnBottom = .top+.headerheight+.relativerow * .rowheight
lnTop = lnBottom - this.rowheight
lnMouseRowPos = mrow(wontop(),3)
lnMouseColPos = mcol(wontop(),3)
llChangingRow = !(between(lnMouseRowPos,lnTop, lnBottom) ;
and between(lnMouseColPos,.left,.left+.width))
Else
llChangingRow = inlist(lastkey(),24,5,18,3,145,148)
Endif
Cetin