Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Control - Append a new record in the last grid row
Message
From
10/11/1998 13:33:18
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00156026
Message ID:
00156269
Views:
32
>>When there are no records in the grid, you can't get focus into a row, because there are no rows. So you can't down arrow to add a record. You could put >something in grid.click() to add a record if the the cursor is empty...
>This is another situation that has the grid screaming for a GotFocus and LostFocus event.

Well, you have When and Valid...

>I was hoping to test This.ActiveRow in the grid and if 0 APPEND a new record but can't determine where. I can't use .Click because the functionality has to be there when TABbing into the grid as well.

'When' fires whether or not there are records in the grid. This would be a good plave to test for activerow and append a record if needed.

>I've ended up using the COUNT... function in the grids .When event and in my >custom Form.DeleteRec event. If 0 then I APPEND.

Be careful with COUNT, it moves the record pointer. For many apps this is annoying if not dangerous...
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform