Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP5 grid behavior
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
VFP5 grid behavior
Divers
Thread ID:
00314057
Message ID:
00314057
Vues:
67
Hello All,

I'm trying to use a grid to update the values of textboxes on a form.

This code is in a form method which is in the click event of stgrid1.column1.text1;

thisform.setall("visible", .t.,"sttextbox")
thisform.setall("visible", .t.,"stlabel")
store ThisForm.Stgrid1.Column1.Text1.value to ThisForm.Sttxthipno.value
store ThisForm.Stgrid1.Column2.Text1.value to ThisForm.Sttxtname.value
store thisForm.Stgrid1.Column3.Text1.value to ThisForm.Sttxtacct.value
store ThisForm.Stgrid1.Column4.Text1.value to ThisForm.Sttxtamtbid.value
store ThisForm.Stgrid1.Column5.Text1.value to ThisForm.Sttxtamtpaid.value
store ThisForm.Stgrid1.Column7.Text1.value to ThisForm.Sttxttype.value
mamtdue = stntrans.amount - stntrans.amtpaid
mbilldate = stntrans.billdate
select stnbuyer
seek thisForm.Stgrid1.Column3.Text1.value
if fname <> " "
mlname = trim(fname) + " " + trim(lname)
else
mlname = trim(lname)
endif
maddress = trim(city) + ', ' + trim(state) + ' ' + country
mldate = ThisForm.Sttxtmldate.value
mlastbilldate = ThisForm.Sttxtmlastbilldate.value
mcnt = mldate - mlastbilldate
mtot = (mamtdue * .0005) * mcnt
thisform.refresh

When the user clicks the textbox in the grid, only the textbox on the form that corresponds with the grid has it's value updated. All the others remain stagnant.

I've tried moving the method to the afterrowcolchange event to no avail.

The grid's source if a free table, while the textboxes have no control source.

Any ideas appreciated.

Jim Harvey
jharvey@netrax.net
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform