Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting a record into a grid
Message
From
10/01/2003 14:41:02
Jorge Haro
Independent Consultant
Juarez, Mexico
 
 
To
07/01/2003 12:25:34
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00738883
Message ID:
00740455
Views:
20
Hi Steven

Assuming you are positioned in the record where you wish to insert ...
select mytable
local lnKey
lnKey = mytable.nKey
replace all nKey with nKey + 1 for nKey >= lnKey
insert into mytable(nKey,cOtherValue) values(lnKey, 'SOME DATA')
Something else that I like to do in this scenario is put a couple of buttons beside the grid, that allow the user to move a record up or down
by swapping the key values between two records.

>Hi,
>
>To insert a record into a grid, between two records, I found it next to impossible. After many hours of work, I found that I had to delete all index tabs, then insert the record, and then re-create the indexes. This is very cumbersome, and dangerous.
>
>Any easier solutions, anyone ?
>
>Regards,
>
>Steve.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform