When we edit a row in our Grid View and press the “Update” button, at some time it’s received in the Row Updating method.
But as I noted in the comments in that method, some collections that should contain the columns (names, old values and new values) are always empty. And the Row Updated method is never even touched!!! NET Forums that I need to use a Data Source control.
All samples of course assume you’re doing everything in your page, but I have to do everything in my code-behind, because on forehand I don’t know what I’ll be binding to my Grid View.
Check out what I’m trying to do, maybe you can help?
To cancel the update operation, set the Cancel property of the Grid View Update Event Args object to true.
You can also manipulate the Keys, Old Values, and New Values collections, if necessary, before the values are passed to the data source.
"test" will appear in label not "asd" as I would want to.
When I click edit on the grid and change the value of the textbox and click update the label will just display the original value of the textbox. "When I click edit on the grid and change the value of the textbox and click update the label will just display the original value of the textbox." So lets say there is "test" in the textbox originally and then I edit it to "asd" then click update.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition The . Web Controls Namespace Grid View Update Event Args Grid View.
How do I grab the new values from these textboxes and proceed further?
The Row Updating event is raised when a row's Update button is clicked, but before the Grid View control updates the row.
check if you're getting the new value for it or not as it's based on the assumption that the label is the first control in the grid.
You're accessing so many items without null checks that it could be any number of things. Are you sure all of the controls exist in the cells you're specifying?