FoxPro/Visual FoxPro - grid

 
Vista:
sin imagen de perfil

grid

Publicado por wenceslao piraquive (137 intervenciones) el 24/06/2008 16:23:22
bueno me encuentro con que tengo un grid, donde almaceno temporalmente la informacion para luego vaciarla a la tabla principal, el problema es que cada vez que doy un clic, la grilla me queda en blanco, quiero que me muestre todos los registros capturados en la tabla temporal.

si me pueden ayudar, gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:grid

Publicado por juan fernando (537 intervenciones) el 24/06/2008 22:52:38
después de traspazar los datos ,debes redibujar nuevamente el grid
mediante código,limpiar el foco del grid,refrescar etc.
podrías exibir algo de código para tener eso si una mejor óptica .
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

RE:grid no refresca

Publicado por wenceslao piraquive (137 intervenciones) el 24/06/2008 23:03:31
esta es una pequeña muestra del codigo que estoy utilizando para cargar la tabla temporal, la cual esta asociada al grid

IF thisform.fcantidad.Value>0

SELECT temporal

APPEND BLANK
REPLACE codigo WITH fcodigo
REPLACE nombre WITH fnombre
REPLACE cantidad WITH fcantidad

thisform.Refresh

thisform.aceptar.Enabled=.f.

ENDIF
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:grid no refresca

Publicado por juan Fernando (537 intervenciones) el 26/06/2008 21:17:02
asi debes redibujar para que no aparezca en blanco después de
cargar nuevos datos .


If Found()
Set Filter to factura=fac
Thisform.Command1.Enabled=.f.
Thisform.Pageframe1.Page1.Text3.Enabled=.f.
*------------------------------------------------------------------------

Thisform.Pageframe1.Page1.Text1.Value=rut
Thisform.Pageframe1.Page1.Label8.Caption=nom
Thisform.Pageframe1.Page1.Text4.Value=fec

*------------------------------------------------------------
Thisform.Pageframe1.Page1.Grid1.AllowAddNew=.t.
Thisform.Pageframe1.Page1.Grid1.ColumnCount=4
Thisform.Pageframe1.Page1.Grid1.RecordSource=" "

*------------------------------------------------------------------------------

Thisform.Pageframe1.Page1.Grid1.Column1.Header1.Caption="Cant."
Thisform.Pageframe1.Page1.Grid1.Column1.ControlSource="facturar.cantidad"
Thisform.Pageframe1.Page1.Grid1.Column1.InputMask="9999999.9"

*----------------------------------------------------------------------------

Thisform.Pageframe1.Page1.Grid1.Column2.Header1.Caption=" Descripción"
Thisform.Pageframe1.Page1.Grid1.Column2.ControlSource="facturar.descripcio"
Thisform.Pageframe1.Page1.Grid1.Column2.Format="@!"

*------------------------------------------------------------------------------

Thisform.Pageframe1.Page1.Grid1.Column3.Header1.Caption="Pre.Unit."
Thisform.Pageframe1.Page1.Grid1.Column3.ControlSource="facturar.preciovent"
Thisform.Pageframe1.Page1.Grid1.Column3.InputMask="99,999,999"

*------------------------------------------------------------------------
Thisform.Pageframe1.Page1.Grid1.Column4.Header1.Caption="Total"
Thisform.Pageframe1.Page1.Grid1.Column4.ControlSource="facturar.neto"
Thisform.Pageframe1.Page1.Grid1.Column4.InputMask="99,999,999"

Thisform.Pageframe1.Page1.Grid1.Refresh
Endif

2º si es un cursor sql

** aquí ya está creado el cursor ***
sele temporal
Thisform.Pageframe1.Page1.Grid1.AllowAddNew=.t.
Thisform.Pageframe1.Page1.Grid1.ColumnCount=4
Thisform.Pageframe1.Page1.Grid1.RecordSource="Temporal "

Thisform.Pageframe1.Page1.Grid1.Column1.Header1.Caption="Cant."
Thisform.Pageframe1.Page1.Grid1.Column1.ControlSource="Temporal.cantidad"
Thisform.Pageframe1.Page1.Grid1.Column1.InputMask="9999999.9"


Etc ..
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar