Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to add records in grid
Message
From
20/12/2006 09:54:25
 
 
To
20/12/2006 09:25:05
Mk Sharma
Shrishti Solutions
Mumbai, India
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01179181
Message ID:
01179191
Views:
12
>i am using pagedown button to add records in grid.
>
>in keypress event of every column.textbox in grid.
>i have below code in pageframe.page1.grid1.column1.textbox
>
>
>Lparameters nKeyCode, nShiftAltCtrl
>If nKeyCode=3
>   Select INWARD1
>   Flush
>   This.Refresh
>   Flush
>   Select INWARD1
>   If (qty+Free)<>0
>      Insert Into INWARD1 (VNO, Status, Type, RECO1, machineid, lqty) Values (INWARD.VNO, INWARD.Status, INWARD.Type, INWARD.RECO1, INWARD.machineid, .T.)
>      Go Recno()
>      Thisform.pageframe1.page1.grid1.Refresh()
>      Thisform.pageframe1.page1.grid1.SetFocus()
>      Thisform.pageframe1.page1.grid1.colUMN1.SetFocus()
>   Endif
>Endif
>
>

You could just set Grid.AllowAddNew=.T., or give users a button with Insert... code inside. I wonder if 'PageDown' would be confusing for your users.
>warm regards,
>mk.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform