I believe that databinding on every postback is the cause but that's not something that I can change right now, same goes with the autogeneratedcolumns setting. I'm not sure if I know what you mean about 2 way binding. If you meanam I using Bind instead of Eval in my HTML, then yes. And the result of your code is no different than my version or what I was doing before, which was just using the findcontrol method, and that just returns what was in the grid when it was first binded to the database on page load. Yes ok i think i know what you are probably doing wrong.
I'd like to know if there are any other ways to retrieve the new values? I have been using the web site successfully for just over a year, and I am presently using a Select button in the row to launch a detailsview, and I edit the database that way. Net a year and a half ago, and VB programmer forever before that, but I feel pretty confident in this large and powerful website I have created, but the users don't like the details view have expressed a desire to edit on the fly in the gridview. My user base has a hold of management's ear, and my management wants to dump ASP. This could be the straw that broke the camel's back - a person's job hangs in the balance - MINE!! If you are databinding in page_load then you need to only do it if(!
I know its very annoying and hard to get the data out of the data controls (gridview in this case), but there are other things you can do to make it easier.
The reason is we don't fill the values unless your are bound to a datasource control.
Grid View has a method that is unfortunately protected called Extract Row Values. I've attached my code for what it's worth, but it will probably be too dificult to determine everything that I am doing. Is there a flag I can turn on or off when I am doing row updating so that I can detect and not rebind? Net while am trying to update the row it was not getting updated. Find Control("txt Name3"), Text Box) 'doupdate(txt Name1, txt Name2, txtname3, txt Name) 'con. Instead, it throw an exception Object reference not set to an instance. Protected Sub Grid View1_Row Updating(By Val sender As Object, By Val e As System. Open() cmd = New My Sql Command("update login set username='" & txt Name1. Eureka, and phoooey....yeah, that was the problem, but now I have to solve another problem.