Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problemão com Grid e botão gravar
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00725192
Message ID:
00725250
Vues:
9
Obrigado a todos pela pronta resposta .

A resposta que solucionou o meu caso , foi dada pela ( grande ) Nadya no forum em inglês .
Reponho a solução
with thisform


* code from  06/06/2002 Vlad Grynchyshyn
	local oObj
	if type('thisform.activecontrol.name')='C'
		oObj = .activecontrol
&& If it's a grid, we need to calculate the active control
		if upper(m.oObj.baseclass) == "GRID"
			nIndex = m.oObj.activecolumn
			for i=1 to m.oObj.columncount
				if m.oObj.columns(i).columnorder = nIndex
					nIndex = i
					exit
				endif
			endfor
			oObj = m.oObj.columns(nIndex)
			oObj = evaluate("m.oObj." + m.oObj.currentcontrol)
		endif

&& Check if control has different value than its ControlSource
		if proper(m.oObj.baseclass)='Textbox' and not empty(m.oObj.controlsource) ;
				and !(m.oObj.value==evaluate(m.oObj.controlsource))
			m.oObj.value = m.oObj.value && Updated:NN: 06/07/02
			lReturn = m.oObj.valid() && This is enough to write changes into ControlSource
			if (vartype(m.lReturn)='N' and m.lReturn = 0) or m.lReturn = .f.
				return .f.
			endif
		endif
	endif

endwith


Pedro Silva

world is wonderful with your help .

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform