Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to add record in grid
Message
From
24/08/1999 11:29:56
 
 
To
22/08/1999 03:40:52
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00256366
Message ID:
00257092
Views:
17
>First of all, thanks a lot of your response !
>
>the controlsource of grid is table, and buffer mode=5, I would like
>to the grid can automatic add blank record while the user press entry
>in last grid column.
>
>
>>>How to add record when the cursor lost focus in last column?
>>
>>More information please...
>>
>>Is the record source of the grid a table, a view, or a cursor ??? Is the record source updatable, and is it still selected ???
>>
>>Regards,

The simple way to do what you want is to set the grid's AllowAddNew property to true. When the user is on the bottom record in the grid and they hit the down arrow, VFP will add a new record to the grid. With buffer mode 5, you will have a dirty buffer that you will have to deal with. I force my users to confirm or abort changes when leaving a row, but you can do it when the grid loses focus or when the form goes inactive, or pretty much whenever you want to so long as you make sure it gets taken care of before the form tries to close.

There are other ways to do what it sounds like you're after, but this is the easiest.

Regards,

Jason
Jason Tryon
Senior Systems Analyst / Technical Lead
eBusiness / iPage
Previous
Reply
Map
View

Click here to load this message in the networking platform