>Hi. I have a grid, that has a fixed qty of lines. All of them are visible on the screen. When you select the last line and then press Arrow Down Key , the records move up and you see a blank line there.
>How to Stop That?
Good morning, Grant,
About 5 seconds after I left last night, I figured it out.
The behavior you are seeing is native VFP grid behavior. The empty row is available in the event your .AllowAddNew so the new record has a place to go.
To eliminate the appearance of this row, you will need to trap, control and eliminate the down arrow (and I think the page down) keypresses.
You cannot do this in the grid itself since it has no keypress event, nor does the grid column. The only place it can be done is in each control in every column. So in the keypress event of each control in the grid, add,
#define KDNARROW 24
#define BOTTOMROW 8
WITH this.parent.parent
IF .activeRow = BOTTOMROW .AND. nKeyCode = KDNARROW
NODEFAULT
ENDIF
ENDWITH
That should do it.
Regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.comNo trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.