this.setall("Enabled", recno()<0,"Textbox")If you prefer the math way then you could furnish this code to your taste :
*beforerowcolchange LPARAMETERS nColIndex llChangingRow = .f. WITH this oColumn = .columns(.FindColumn(nColIndex)) IF lastkey() = 145 && Adding new rec - personal choice to trigger add (Ctrl+dnarrow) .nLastValidRec = .nCurrec && Both custom grid properties ENDIF thisform.LockScreen = .lInGrid && Related with higlight - custom property 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 IF llChangingRow *.... && User attempted to change row * if cannot let to go nodefault *else *.... *endif ELSE *... ENDIF ENDWITH * Custom findcolumn method LPARAMETERS nColIndex LOCAL ix WITH this FOR ix = 1 to .columncount IF .columns(ix).ColumnOrder = nColIndex RETURN ix ENDIF ENDFOR ENDWITHCetin