Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referencing grid objects
Message
De
02/02/1999 12:15:27
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00182747
Message ID:
00182997
Vues:
15
>Thanks, Cetin. With your help, I got it to work using:
>
* frmGridTest.grdInqPost.BeforeRowColChange
>LPARAMETERS nColIndex
>LOCAL CtrlName
>WITH THIS
>	IF NOT EMPTY(.Columns(nColIndex).DynamicCurrentControl)
>		CtrlName = EVALUATE( .Columns(nColIndex).DynamicCurrentControl )
>	ELSE
>		CtrlName = .Columns(nColIndex).CurrentControl
>	ENDIF
>	IF EVALUATE(".Columns(nColIndex)." + m.CtrlName + ".Value") ;
>			!= OLDVAL( .Columns(nColIndex).ControlSource )
>		WITH THISFORM
>			.cmdSave.Enabled = .T.
>			.cmdClose.Cancel = .F.
>			.cmdCancel.Enabled = .T.
>			.cmdCancel.Cancel = .T.
>		ENDWITH
>	ENDIF
>ENDWITH
>Seems like, if I only have one control in each column, I could skip the part which checks whether to use DynamicCurrentControl or just CurrentControl. I'll play around with that and see what I can get to work. I think my problem with original code is just that I should have used EVAL(.Columns(nColIndex).CurrentControl + ".Value") on the left side of my comparison. I was leaving out the EVAL().
>
>Thanks again,
Rich,
	IF EVALUATE(".Columns(nColIndex)." + m.CtrlName + ".Value") ;
			!= OLDVAL( .Columns(nColIndex).ControlSource )
part seems to fail. Strange maybe but you need a .value = .value first.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform