Another GridView Problem (not refreshing after an insert)

I have a GridView1 on a ASP.NET page that feeds from another page. The other page provides two parameters.

New records for the Gridview are entered by a FormView on the same page.

The grid works fine, but whenever I Insert a record in my Formview , the new record does not get displayed. I don't think this is a postback problem. When I delete a record, the gridview refreshes fine, no problem. I have tried putting a gridview databind everywhere to no avail. Once I go back and reload the page, I can see the new records in the gridview.

Can it be possible that if it requires parameters, it can not read new items from the DB.

Any help is appreciated.

[697 byte] By [NeftaliReyes] at [2007-12-22]
# 1

Well!!! I just got tired of trying to make this thing work so I just added a refresh button to the bottom of the grid and that solved my problem. However, I think some of these events on these controls are not working as they are supposed to. I triggered on the Formview event as well once the item had been inserted and that didn't work either.

Any way, I'm happy with the refresh button and I'm inclined to use it more often from here on out.

NeftaliReyes at 2007-8-30 > top of Msdn Tech,Feedback for forums and MSDN websites,Off-Topic Posts (Do Not Post Here)...
# 2

Just put this while you add a row, do it for also for deleting a row. This refreshes the gridview and requeries the db.

Protected Sub InsertButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)

GridView1.ShowHeader = False

GridView1.ShowHeader = True

End Sub

Cem?ak?rlar at 2007-8-30 > top of Msdn Tech,Feedback for forums and MSDN websites,Off-Topic Posts (Do Not Post Here)...