Do you have some sort of Java Script functionality that may be stopping it? A common problem people have with Grid Views is understanding when to data bind the data source to the Grid View.
I put a breakpoint on the Row Updating event handler and found that the event is not fired. I put a breakpoint on the Row Updating event handler and found that the event is not fired. In the Row Editing function, the edit textboxes appear and I can get the "old" values Then the page renders, I edit the textboxes and hit Update.
Right now, I have not written code for the Update event. Right now, I have not written code for the Update event. Then the page posts back, the text boxes go back to being labels and the new values are lost, and the Row Updating code never fires.
This enables you to provide an event-handling method that performs a custom routine, such as canceling the update operation, whenever this event occurs.
A Grid View Update Event Args object is passed to the event-handling method, which enables you to determine the index of the current row and to indicate that the update operation should be canceled.
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?For example a Sql Data Source, which is automatically added to your Web Form if you drag-n-drop your way around Visual Studio 2005.The problem is, I’d very much like to do so, if ASP. But I can’t set a Data Source property or anything on the Sql Data Source!!! I probably have to read the cells on the Grid View of the selected row, find the controls, get the values from those and insert those into my Data Set.To cancel the update operation, set the collections, if necessary, before the values are passed to the data source.A common way to use these collections is to HTML-encode the values supplied by the user before they are stored in the data source. 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.