Never mind Erik. I found out that the problem was that I was using thisform.pageframe.page1.refresh instead of thisform.refresh
Apparently a page refresh does not refresh a grid on the page. Why does this happen ?
Thanks in Advanced or Hope This Helps