General information
Title:
Programar el Metodo Valid del Text de la Columna de un Grid
Hola amigos, yo suelo usar el diseñador de formularios para agregar columnas y programar los metodos pero en este caso al grid que he colocado en el formulario con el diseñador le agrego columnas en tiempo de ejecucion mi problema es que ahora no se como agregar codigo a los metodos VALID de los TEXT de cada columna aqui adjunto algo del codigo :
** este el el codigo del INIT del formulario ****
PARAMETER cBase,cNombre
SET MULTILOCKS ON
IF SELECT(cBase)=0
USE DriveBases+"\Bases\&cBase" IN 0 SHARED
ENDIF
SELECT &cBase
SET ORDER TO TAG CODIGO
THISFORM.CAPTION = cNombre
THISFORM.tablas.RECORDSOURCE = cBase
THISFORM.tablas.REFRESH
* Cuento las columnas de la tabla
DIMENSION aCampos(FCOUNT())
DIMENSION aSizes(FCOUNT())
FOR i=1 TO FCOUNT()
aCampos(i) = FIELD(i)
aSizes(i) = FSIZE(FIELD(i))
NEXT
* creo las columnas
THISFORM.tablas.ColumnCount = ALEN(aCampos)
i=1
FOR EACH oCols IN THISFORM.tablas.COLUMNS
oCols.CONTROLSOURCE = aCampos(i)
oCols.ENABLED = .F.
oCols.WIDTH = aSizes(i)*10
oCols.header1.CAPTION = aCampos(1,i)
sss
oCols.ADDOBJECT("text2","mytextbox")
i = i + 1
ENDFOR
*DEFINE CLASS mytextbox AS textbox
* Height = 23
* Width = 100
* Name = "mytextbox"
* PROCEDURE valid
* clear events
*ENDDEFINE
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only