>IF EOF(THIS.RecordSource) OR BOF(THIS.RecordSource) OR DELETED(THIS.RecordSource) > GO TOP IN (This.RecordSource) > IF EOF(THIS.RecordSource) > APPEND BLANK IN (THIS.RecordSource) > ENDIF >ENDIF >Hi all,
IF EOF(THIS.RecordSource) APPEND BLANK IN (THIS.RecordSource) ENDIF this.refresh && Strange - but needed if grid getsfocus with clickIf table is buffered appending a new row is not dangerous and simply could be reverted in valid of grid. Adding code in beforerowcolchange and valid to check for row validation makes this a good way for using allowaddnew=.t. Plus a sequence like this provide another keycombination to be used to add records (I use Ctrl+DnArrow) so user doesn't need to scroll down to last record:
*Afterrowcolchange .allowaddnew = .f. if lastkey() = 145 and this.lRowValidated() && lRowValidated checks row validation go bottom in (.recordsource) .allowaddnew = .t. keyboard "{DNARROW}" .refresh endifCetin