Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add New Line to Grid
Message
From
09/07/2007 02:26:37
Aye Mya Thida Kyaw
Ingenuity Microsystems Sdn Bhd.
Kuala Lumpur, Malaysia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Add New Line to Grid
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01238532
Message ID:
01238532
Views:
55
Hi Everybody,

Having problem with grid....
When user double click to make the grid-column-cell highlighted and press on the add button (which is functioning to insert a blank record in remote view), the grid will be added for two lines. When delete a line also, same problem. My coding details go as follow:

*!*For Add New Line Button Click Method*!*
SELECT fdetail
count for not deleted() to lnline
*!* append blank in fdetail (same problem by using this)
INSERT INTO fdetail(line_no) values(lnline+1)

*!* thisform.pageframe1.page2.grid1.refresh
thisform.refresh
thisform.pageframe1.page2.grid1.column1.setfocus

*!*For Delete Line Button Click Method*!*
delete in fdetail
if !bof()
skip -1
endif

SELECT fdetail
lnlineno=fdetail.line_no
go top
do while !eof()
replace fdetail.line_no with lnno IN fdetail
lnno=lnno+1
SELECT fdetail
SKIP
ENDDO
if lnlineno<>0
locate for fdetail.line_no=lnlineno
endif
Thisform.Refresh
thisform.pageframe1.page2.grid1.column1.setfocus

Those codes work fine for normal operations. But once user selected the grid cell by double clicking and highlighted the field, the problem encountered there.

Remarks : Those codes are working in Form Class Level. The actual working form is derived from the form class.

Hope to get some help on it.

Thanks & much appreciates in advance,
Mya.
Next
Reply
Map
View

Click here to load this message in the networking platform