Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referencing grid objects
Message
From
02/02/1999 12:15:27
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00182747
Message ID:
00182997
Views:
16
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform