ok !
I have a form with a pageframe and two pages. i have a grid on page 1 for sales_items. i have two MySql tables 'sales' and 'sales_items'. i have set the allowaddnew property of the grid to .T. . try to add a new record to the grid and save it (it works fine) now on the grid press the down arrow more than 4 times so that it will look like ur adding more than 4 new records, and then run the update on both tables and walah ! the grid loses its data, but if you browse the table using a button or something, you will see that the data is actually still there but the grid wont show it. here is a sample of how i requery my child table. Please read the notes with a NOTE marker
ThisForm.pageframe1.page1.Grid1.RecordSource=""
NOTE the problem starts here, after the grid1 recordsource is set to "" after this, grid hides the content
NOTE the grid is set to "" before requerying the sales_items table to retain the actuall layout of the grid
lcSQLStmt="Select * from sales_items where TRIM(s_ctrl)='"+ALLTRIM(sales.s_ctrl)+"'"
=sqlexec(lnHandle,lcSQLStmt,"sales_items")
IF !make_updatable("sales_items","si_uid","sales_items","",.F.)
=MESSAGEBOX("sales_items",0,"c")
ENDIF
with ThisForm.pageframe1.page1.Grid1
.RecordSource="sales_items"
NOTE here we set the recordsource back, u can even place a messagebox here to see if the grid recordsource
NOTE has been updated (it is updated) but the grid doesnt show anything
.columns(1).controlsource="sales_items.is_code"NOTE has been updated (it is updated) but the grid doesnt show anything
.columns(2).controlsource="sales_items.is_Ctrl"
.columns(2).combo1.requery()
.columns(3).controlsource="sales_items.emp_Ctrl"
.columns(3).mycombobox1.requery()
.columns(4).controlsource="sales_items.si_qty"
.columns(5).controlsource="sales_items.si_price"
.columns(6).controlsource="sales_items.si_amount"
.columns(7).controlsource="sales_items.si_discount"
.Refresh
ENDWITH
what is weird is that from my button "ADD" "EDIT "SAVE" "CANCEL" ,after the grid shows no sign of life

