Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GRID - DynamicCurrentControl - Is there a limit?
Message
 
 
To
01/10/2001 16:13:07
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00562699
Message ID:
00562756
Views:
20
>I write this code in the Init method of Column:
>
>****************************************************
>This.AddProperty('nOldWidth', This.Width)
>SELE vMonta_fvis
>lcDynamic = ''
>This.AddObject('barra', 'Grupo') && This is a container that no have a object.
>SCAN
>	lcClasse = ALLTRIM(vMonta_fvis.nome_object)
>	lcSubClasse = ALLTRIM(vMonta_fvis.nome_classe) + '_'
>	*
>	IF vMonta_fvis.edit_campo
>		lcDynamic = lcDynamic + "IIF(nome_object = '" + lcClasse + "','" + lcClasse + "',"
>		*
>		This.AddObject(lcClasse, 'Grupo') && This is a container that will have a objects.
>		This.&lcClasse..Visible = .T.
>		This.&lcClasse..AddObject('oCampo', lcSubClasse)
>		This.&lcClasse..oCampo.Visible = .T.
>		IF ALLTRIM(vMonta_fvis.nome_classe) = 'CHECKBOX' .OR. vMonta_fvis.tipo_campo $ 'DT'
>			This.&lcClasse..oCampo.cControlsource = ALLTRIM(vMonta_fvis.nome_bd) + ;
>			    	                                '.' + ALLTRIM(vMonta_fvis.nome_campo)
>		ELSE
>			This.&lcClasse..oCampo.Controlsource = ALLTRIM(vMonta_fvis.nome_bd) + ;
>		    	                                    '.' + ALLTRIM(vMonta_fvis.nome_campo)
>		ENDIF
>		IF !EMPTY(vMonta_fvis.form_campo)
>			This.&lcClasse..oCampo.InputMask = ALLTRIM(vMonta_fvis.form_campo)
>		ENDIF	
>		IF ALLTRIM(vMonta_fvis.nome_classe) = 'COMBOBOX'
>			This.&lcClasse..oCampo.RowSource = ALLTRIM(vMonta_fvis.text_origem)
>		ENDIF
>	ENDIF
>ENDSCAN
>lcDynamic = lcDynamic + "'barra'" + REPLICATE(")", OCCURS("IIF(", lcDynamic))
>This.DynamicCurrentControl = lcDynamic
>GO TOP
>***********************************
>
>In This case the expression for the DynamicCurrentControl is to long.

Sorry, I'm afraid, I don't follow your logic. What is vMonta_fvis? Why do you need to scan this table? You seem to do something really compicated here, but I don't understand, what is your goal here.

What would be a RecordSource for the grid?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform