Information générale
Titre:
Add New Line to Grid
Versions des environnements
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.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement