Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you add code in gotfocus for dynamic built grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01409625
Message ID:
01409745
Vues:
58
>You can use BINDVENT()

Ok, I created a method gotfocus_msg method to call in the bindevent, however it doesn't seem to like retrieve the value from the grid cell. I get a message saying
Property VALUE is not found
Here is my bindevent
**buildgridmethod
....


			.column4.header1.caption = "How Much"
			.column4.header1.ToolTipText = 'How much consumed'		
			.column4.width = 61	
			.column4.Enabled = .t.
			.column4.Text1.DisabledBackColor 	= RGB(255,255,255)
			.column4.Text1.DisabledForeColor = RGB(0,0,0)	
			.column4.controlsource = "crs_grid3.crshowmuch"


BINDEVENT(thisform.g3.column4.Text1 ,[GotFocus], thisform, [gotfocus_msg],1)
and here is my gotfocus_msg method that I want to call when the grid column4 gotfocus
**gotfocus_msg method
MESSAGEBOX('gotfocus'+STR(this.value),0,'')
thisform.celloldvalue = this.Value
I'm not sure if this the way I am suppose to do gotfocus and lostfocus bindevent, but it seems like it cannot resolve the value in grid cell. I'm I missing something here?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform