Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New DS in a program - have problems - Urgent!
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00458554
Message ID:
00458644
Views:
21
Hi Markus,

I choose another route. I create class in a code and therefore don't need to mess up with Grid's recordsource. Seems to work fine, though I'm not sure, it's the best code. Also, I have another question: I defined my class as custom. Perhaps I should use Line istead? Which class has the minimal overhead?
********************************************************************
*  Description.......: StatsClass - wrapper for Stats application
*  Calling Samples...: 
*  Parameter List....: 
*  Created by........: Nadya Nosonovsky 01/02/2001 03:51:10 PM 
*  Modified by.......: 
********************************************************************
DEFINE CLASS Stats AS custom
	Name = "Stats"        
 
	PROCEDURE Init
	lparameters funcid_arg, cmdrob_arg, infile_arg, outfil_arg, param1, param2, param3
		* Create a Private datasession.
	do CREATEPRIVATEDATASESSION with "oStatsData" && Distinguish Data Sessions
	set datasession to oStatsData.datasessionid
	llReturn=RunConfig(funcid_arg, cmdrob_arg, infile_arg, outfil_arg, param1, param2, param3) && for now		
	if vartype(oJC)='O'
	  oJC.CurAppStat=iif(llReturn,'C','I')
	endif
	ENDPROC
ENDDEFINE
>Hi Nadya
>
>Glad it worked, even if only partialy. ;(
>
>I see your problem. Of course you can do this detach/attach of grid controls in this single case from "outside" but definately the better solution would be to define those two methods genericaly in the grids base class. But this needs of course to be discussed in a multi-programmer environment.
>
>To do it on your own, define one array per grid, scan through the columns collection of the grid (this is rather an array) and store the controlSource values in your arrays. Set the ControlSources to "" afterwards, and restore them when done the reverse way. Another problem occurs, when the controls in the columns hold their own Controlsources, that you would have to check also.
>Instead of using external arrays to save the controlSources values you can also use the objects tag or control properties, if they are still unused.
>
>HTH
>Markus
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform