Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referencing grid objects
Message
 
To
01/02/1999 17:53:26
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00182747
Message ID:
00182993
Views:
11
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 Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform