Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   GridView does not refresh after insert with DetailsView (http://www.velocityreviews.com/forums/t380450-gridview-does-not-refresh-after-insert-with-detailsview.html)

needin4mation@gmail.com 10-09-2006 10:09 PM

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.


Mark E. Hansen 10-11-2006 07:08 PM

Re: GridView does not refresh after insert with DetailsView
 
On 10/09/06 15:09, needin4mation@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.


All times are GMT. The time now is 02:35 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57