473,387 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

GridView Update mystery

I have a GridView tied to a SqlDataSource (table) with a PrimaryKey named
ID. When I click the UPDATE link button, the postback happens but nothing
changes. I put a comment in the Updated event of the SqlDataSource and the
comment shows.
I even checked the DataKeyNames on the GridView and that is set to the "ID"
column.
Can anyone tell me where else I might look to find out why the update is not
happening? I am doing this same thing in several other pages and they work
fine. Thanks.

David
Aug 5 '08 #1
2 954
On Aug 5, 9:26*pm, "David C" <dlch...@lifetimeinc.comwrote:
I have a GridView tied to a SqlDataSource (table) with a PrimaryKey named
ID. *When I click the UPDATE link button, the postback happens but nothing
changes. *I put a comment in the Updated event of the SqlDataSource andthe
comment shows.
I even checked the DataKeyNames on the GridView and that is set to the "ID"
column.
Can anyone tell me where else I might look to find out why the update is not
happening? *I am doing this same thing in several other pages and they work
fine. *Thanks.

David
Hi David,

did you check what values you update? Perhaps, you rebuild your grid
in the Page_Load method before the update proceeded.
Aug 5 '08 #2
Yup...that was it. Thanks.

David
"Alexey Smirnov" <al************@gmail.comwrote in message
news:4e**********************************@79g2000h sk.googlegroups.com...
On Aug 5, 9:26 pm, "David C" <dlch...@lifetimeinc.comwrote:
I have a GridView tied to a SqlDataSource (table) with a PrimaryKey named
ID. When I click the UPDATE link button, the postback happens but nothing
changes. I put a comment in the Updated event of the SqlDataSource and the
comment shows.
I even checked the DataKeyNames on the GridView and that is set to the
"ID"
column.
Can anyone tell me where else I might look to find out why the update is
not
happening? I am doing this same thing in several other pages and they work
fine. Thanks.

David
Hi David,

did you check what values you update? Perhaps, you rebuild your grid
in the Page_Load method before the update proceeded.
Aug 5 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: | last post by:
Hello, I have created an ASP.NET 2.0 application that utilized a Gridview Control to display and update/delete data. The problem I am having is that the gridview control is displaying the data...
8
by: Mike Kelly | last post by:
I've chosen to implement the "optimistic concurrency" model in my application. To assist in that, I've added a ROWVERSION (TIMESTAMP) column to my main tables. I read the value of the column in my...
4
by: Nalaka | last post by:
Hi, I have two questions about gridViews. 1. How can I intercept the row/column values at loading to change values? 2. After I update a row (using default update functionality), how can I...
0
by: troyblakely | last post by:
I have a gridview which is pulling data from a SqlDataSource, the select command queries a view and the update command is a stored procedure. I'm using a stored procedure because several tables...
0
by: joebob8000 | last post by:
This seems like a simple task, but my 6 year old roots in classic ASP must be causing me trouble with my current problem. I am looking to provide a search for users in which they can select...
4
by: tim.cavins | last post by:
I have a GridView populated by an ObjectDataSource. I am having issues passing the parameters to the objectdatasource. I have verified that the method is being called but none of the parameters...
4
by: mohaaron | last post by:
This seems like it should be simple to do but for some reason I have been unable to make it work. I would like to databind a SqlDataSource to a GridView during the click event of a button. This...
11
by: Ed Dror | last post by:
Hi there, I'm using ASP.NET 2.0 and SQL Server 2005 with VS 2005 Pro. I have a Price page (my website require login) with GridView with the following columns PriceID, Amount, Approved,...
11
by: SAL | last post by:
Hello, I have a Gridview control (.net 2.0) that I'm having trouble getting the Update button to fire any kind of event or preforming the update. The datatable is based on a join so I don't know...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.