Buenas tardes
Tengo un problemita con el grid
Y es que cuando cargo la primera ves si muestra bien el checkbox
pero cuando actualizo los catos se desaparece y me pone el valor 0
Por que podría ser
Esto tengo en el LOAD
CREATE CURSOR pedidocabecera( unir n(1), pedidocodigo n(8), pedidokey c(25), cod_cliente c(20), namecliente c(50), cod_representante c(20), representante c(50), fecha_creacion d )
Esto esta en el INIT
ok = sqlexec(cambios,'select unir, pedidocodigo, pedidokey, cod_cliente, namecliente, cod_representante, representante, fecha_creacion, borrado from pedidocabecera where enviado = 0 and borrado = 0','consulipoee2')
IF ok< 0
DO perror
ENDIF
SELECT consulipoee2
GO TOP IN consulipoee2
Thisform.grid1.recordsource = ""
Thisform.grid1.RecordSourceType= 1
thisform.grid1.RecordSource= "consulipoee2"
thisform.grid1.Refresh
*thisform.grid1.SetAll("Readonly",.t.,"Column")&& columnas solo lectura
thisform.grid1.Setall("Fontsize",9,"Column")&& tamaño de letras en columnas
thisform.grid1.Setall("Fontsize",9,"Header")&& tamaño de letras en Encabezado Columnas
thisform.grid1.Setall("FontBold",.t.,"Header") && Encabezado en negritas
thisform.grid1.Setall("resizable",.T.,"Column") && NO permite que se muevan las columnas
**********Ancho de Columnas Grid 2********************************************
thisform.grid1.column1.Width = 39
thisform.grid1.column2.Width = 50
thisform.grid1.column3.Width = 105
thisform.grid1.column4.Width = 83
thisform.grid1.column5.Width = 187
thisform.grid1.column6.Width = 87
thisform.grid1.column7.Width = 243
thisform.grid1.column8.Width = 93
***********Nombre de Columnas**************************************************
thisform.grid1.column1.Header1.Caption="Unir"
thisform.grid1.column1.Header1.Alignment=2
thisform.grid1.column2.Header1.Caption="Codigo"
thisform.grid1.column2.Header1.Alignment=2
thisform.grid1.column3.Header1.Caption="Pedido"
thisform.grid1.column3.Header1.Alignment=2
thisform.grid1.column4.Header1.Caption="Cod. Cliente"
thisform.grid1.column4.Header1.Alignment=2
thisform.grid1.column5.Header1.Caption="Cliente"
thisform.grid1.column5.Header1.Alignment=2
thisform.grid1.column6.Header1.Caption="Cod. Vendedor"
thisform.grid1.column6.Header1.Alignment=2
thisform.grid1.column7.Header1.Caption="Vendedor"
thisform.grid1.column7.Header1.Alignment=2
thisform.grid1.column8.Header1.Caption="Fecha Creacion"
thisform.grid1.column8.Header1.Alignment=2
Esto es un boton que actualiza
CREATE CURSOR consulagestion ( pedidocodigo n(8), pedidokey c(25), cod_cliente c(20), namecliente c(50), cod_representante c(20), representante c(50), fecha_creacion d)
varcompruebaclie=""
contame = 0
SELECT consulipoee2
GO top
SCAN for consulipoee2.unir = 1
contame = contame +1
aaa = consulipoee2.pedidocodigo &&thisform.grid1.column2.text1.Value
bbb = consulipoee2.pedidokey &&thisform.grid1.column3.text1.Value
ccc = consulipoee2.cod_cliente &&thisform.grid1.column4.text1.Value
ddd = consulipoee2.namecliente &&thisform.grid1.column5.text1.Value
eee = consulipoee2.cod_representante &&thisform.grid1.column6.text1.Value
fff = consulipoee2.representante &&thisform.grid1.column7.text1.Value
ggg = consulipoee2.fecha_creacion &&thisform.grid1.column8.text1.Value
*****rellenamos el cursor******************************************
INSERT INTO consulagestion values(aaa, bbb, ccc, ddd, eee, fff, ggg)
*****************Borramos de la BD los pedidos que se van a unir, dejando solo 1**********
IF contame > 1
ok = SQLEXEC(cambios, "update pedidocabecera SET borrado = 1 where pedidokey= ?bbb")
IF ok<0
DO perror
endif
endif
ENDSCAN
thisform.Refresh
thisform.Init
Cuando hace esta parte y vuelve al Init es cuando se jode todo
Saludos cordiales