For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > February 2008 > GridView not updating









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author GridView not updating
David C

2008-02-29, 7:21 pm

I have a new GridView that has an SQL table as a datasource. The primary
key is included but not visible. When I click the Edit link button, change
a column's data and click Update, nothing changes and I do not get any
error. The UPDATE has a WHERE clause of "WHERE ID = @ID" and the ID field is
in the Update Parameters. Can anyone help me resolve this? I am doing the
same thing with other tables and they are updating fine. Thanks.

David


David C

2008-02-29, 7:21 pm

I figured it out but it is wierd. I was doing a DataBind() on the gridview
in page load. Once I took that out it worked. That is strange.

David
"David C" <dlchase@lifetimeinc.com> wrote in message
news:uXBIpUueIHA.5296@TK2MSFTNGP05.phx.gbl...
>I have a new GridView that has an SQL table as a datasource. The primary
>key is included but not visible. When I click the Edit link button, change
>a column's data and click Update, nothing changes and I do not get any
>error. The UPDATE has a WHERE clause of "WHERE ID = @ID" and the ID field
>is in the Update Parameters. Can anyone help me resolve this? I am doing
>the same thing with other tables and they are updating fine. Thanks.
>
> David
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com