I have a similar problem to the one you answered on 12 April 2004.
We have a fully editable datagrid that has textboxes for each cell. I have added the code you suggested, and the only bit that doesn't seem to work is that the values returned in the grid are not the values that have been typed into the grid (they are the values that were loaded initially instead).
-In the database, the value is 3.
-I run the project and modify that cell's value to 4.
-When I click on the Upgrade button performing the code you earlier suggested the value for mytxt.Text is still 3, not 4.
Can you think of why this would be and/or way around this?
I have a hunch of what it may be. Check so that you're not performing databinding again when the page is posted back, as that will reload the values from the DB instead of retaining what you edited on the page.
Dig Deeper on Win Development Resources
Related Q&A from Daniel Cazzulino
Here Daniel Cazzulino explains how to load a DSL (domain specific language) domain model instance file programmatically. This requires the .NET type ... Continue Reading
Here we offer a glimpse at 12 of .NET development expert Danny Cazzulino's top ASP.NET questions and answers. Continue Reading
C# developers should NOT be modifying InitializeComponent method in the code-behind (or any of the variable definitions) by hand. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.