Last post Jul 11, 2011 09:12 AM by SpclFrcs
Jul 08, 2011 12:23 PM|SpclFrcs|LINK
Hello all, new to this. I am using Visual Web Developer 08 express, sql srvr express 2008. I have a drop down that pulls from the sqldatasource, then I have a series of gridviews from multiple tables that are populated via objectdatasource based on the drop
down selection. All of that works fine. I ran into a problem when I tried to use Edit/Update in the gridviews. When I edit a field and click on update, that field gets updated but the rest of the fields within that row all get deleted in the database. I am
using the VWD wizards to do all of this, so I have written zero code. Can anyone help? Thanks. Can anyone suggest a better way to do what I am doing if this can't be resolved?
Jul 08, 2011 12:44 PM|princeG|LINK
Please check here: http://forums.asp.net/p/1536223/3733817.aspx/1?Re+GridView+With+ObjectDatasource
Jul 10, 2011 09:56 PM|Decker Dong - MSFT|LINK
When I edit a field and click on update, that field gets updated but the rest of the fields within that row all get deleted in the database.
How did you do codding with that? Would u mind listing all the codes?
Jul 11, 2011 09:12 AM|SpclFrcs|LINK
What I thought would work (below) did not. Just to many problems and no good solutions, at least for me whom does not understand to much script. So I abaondoned that idea and moved to Linq to Sql and that is working like a charm for what I need.
Well I think I have figured it out. I was using the same TableAdapter query on multiple gridviews all triggerd by the sql bound dropdown list. And apparently when you do that bad things happen, like the other data in that row in the database all get deleted.
I tried using two seperate queries in two seperate TableAdpapters that both pulled the exact same data from the databse and upon editing either of those the whole thing worked correctly. I still have a bit more testing to do but so far this solution seems
to be working.
As for the codding, I just used the TableAdapter Configuration Wizard and other VWD tools and it is all HTML, no C# or Java. I personally have not written any code at all. Which makes all of this that much more challenging for me when something doesn't go
I will provide an update as to how this new possible solution is working after I build a new page based on my new theory.
Thank you these links have been helpful.