RE:¿ COMO ACTUALIZAR UN GRID DESDE UN CURSOR
EJEMPLO
** En un botón de Grabar
* Agregar registros desde un cursor
** cada vez que agregue un nuevo registro el Grid1 se
**actualizará ,osea aparecerá este registro al final de
**la tabla ,en este caso no es necesario crear una tabla Temporal
Sele micursor
publi xnom
xnom=Thisform.Pageframe1.Page1.Text2.Value
INSERT INTO FOTOS(codigo,nombre) ;
VALUES(cod,xnom)
* = TABLEUPDATE(.T.)
Thisform.Pageframe1.Page1.Text1.Value=" "
Thisform.Pageframe1.Page1.Text2.Value=" "
**-----------------------------------------------**
Thisform.Pageframe1.Page2.Grid1.AllowAddNew=.f.
Thisform.Pageframe1.Page2.Grid1.ColumnCount=2
Thisform.Pageframe1.Page2.Grid1.Column1.Header1.Caption="Código"
Thisform.Pageframe1.Page2.Grid1.Column1.ControlSource="fotos.codigo"
Thisform.Pageframe1.Page2.Grid1.Column1.FontBold=.t.
**-------------------------------------------------------------------------""
Thisform.Pageframe1.Page2.Grid1.Column2.Header1.Caption="Nombre Foto "
Thisform.Pageframe1.Page2.Grid1.Column2.ControlSource="fotos.nombre"
Thisform.Pageframe1.Page2.Grid1.Column2.Format="!"
**---------------------------------------------------------------------
ThisForm.Pageframe1.Page2.Grid1.RecordSource="Select *From fotos into cursor cursor2"
ThisForm.Pageframe1.Page2.Grid1. RecordSourceType=4
Thisform.Pageframe1.Page2.Grid1.Refresh
Thisform.Refresh