Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid can't be empty when adding data
Message
De
23/01/2004 20:15:19
Fil John Mates
E-Fildan Computer Software System
Davao, Philippines
 
 
À
22/01/2004 08:23:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00869254
Message ID:
00870189
Vues:
12
hi.. thanks for the answer..
well, i put that code to my work but still can't solve my problem.

here are the codes i wrote in the add botoom..

tempnum = VAL(Thisform.txtORNO.Value) + 1
thisform.txtorno.Value = STR(tempnum)
thisform.txtdate.Value = {}
thisform.txtcode.Value = ""
thisform.txtname.Value = ""
thisform.txtcash.Value = 0
thisform.txtchkno.Value = ""
thisform.txtchkdate.Value = {}
thisform.txtchkamnt.value = 0
thisform.txtbank.Value = ""
thisform.txtremarks.Value = ""
thisform.txtamount.Value = 0
thisform.okedit = .t.
thisform.grid1.recordsource="" &&& i make this code so that the grid will empty during adding data.
Thisform.grid1.Refresh()

in my program i make a locate botton to put data to the grid. but the problem is that the data will not display to the grid. but when i browse the table the data is there.here are the codes

DO FORM locatepatient.scx

LOCAL lcoldselect

lcoldselect = SELECT()

thisform.txtcode.value = patienthdr.code
thisform.txtname.Value = patienthdr.name

SELECT * from Patientdtl WHERE Patientdtl.code == ALLTRIM(thisform.txtcode.Value) INTO CURSOR tpatient
SELECT tPatient
SCAN
SELECT Ordetail
APPEND BLANK
Replace ORNO WITH thisform.txtorno.Value
Replace resultname WITH tPatient.type
Replace amount WITH tPatient.price
Replace paid WITH tPatient.paid
ENDSCAN
Thisform.Refresh()
thisform.grid1.Refresh()
SELECT(lcoldselect)

the recordsource of the gird is the ordetail.

my friend told me if i put this code thisform.grid1.recordsource="" the grid was un bind.my problem is if i will not put this when i add new data the grid will not empty.

hope u can help me..


john
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform