General information
Title:
Add New Line to Grid
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only