467,927 Members | 1,827 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,927 developers. It's quick & easy.

GridView does not refresh after insert with DetailsView

Not sure what I'm doing wrong here. I have a gridview and a
detailsview. The detailsview is set to insert by default. When I
insert data the detailsview it works. The data goes in the database.
The gridview on the page, however, never refreshes to show the new row.
The sql for the gridview defaults to a LIKE % and when the page first
loads I can see all the records.

If after I try an edit a gridview record and delete or cancel, then my
new record will show up (it queries correctly.)

What have I done wrong?

Thank you for any help.

Oct 9 '06 #1
  • viewed: 5702
Share:
1 Reply
On 10/09/06 15:09, ne***********@gmail.com wrote:
Not sure what I'm doing wrong here. I have a gridview and a
detailsview. The detailsview is set to insert by default. When I
insert data the detailsview it works. The data goes in the database.
The gridview on the page, however, never refreshes to show the new row.
The sql for the gridview defaults to a LIKE % and when the page first
loads I can see all the records.

If after I try an edit a gridview record and delete or cancel, then my
new record will show up (it queries correctly.)

What have I done wrong?

Thank you for any help.
Does your DetailsView have an Item Inserted Event? If so, place a call to
the Grid View's DataBind() method in there. You may want to do the same
with the Item Updated and Item Deleted events.
Oct 11 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by P. Yanzick | last post: by
1 post views Thread by Giorgio | last post: by
reply views Thread by jeffmagill | last post: by
reply views Thread by luvdairish | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.