Gridview updating event in asp net updating war file with ant
You should create your data source once (on the user's first visit) and store it into Session for later use, and only bind the Grid View to the data source when it is necessary to do so.I would recommend trying this out and starting a new thread in the .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.-Frinny Hi all, I seem to be having the same issue but I don't quite follow the trouble with the above post. Can you explain the T/S a little more or maybe point me to another post that may have already covered it? Hi all, I seem to be having the same issue but I don't quite follow the trouble with the above post. Can you explain the T/S a little more or maybe point me to another post that may have already covered it? It's quite common that people create the data source and bind this source to the Grid View in their Page_Load() method.I am using a SQLData Source to populate my gridview in ASP. When I hit Edit, the textboxes appear and I am able to edit my values. I am using a SQLData Source to populate my gridview in ASP. When I hit Edit, the textboxes appear and I am able to edit my values. 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.When I hit Update, the changes are not saved, and there is no error message. When I hit Update, the changes are not saved, and there is no error message. 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. Yes, I did put the breakpoint at the Row Updating line (and not in the function).
Binding form controls is mostly a simple matter of attaching a Data Source and setting your controls to reference the correct field in the Data Source.
Binding a Grid View control can sometimes get tricky when using the Visual Studio editor, especially when working with Drop Down List controls within the grid.
Today I was working on getting a row of the Grid View control to save the contents of a Drop Down List, and needed to add some custom code to set values passed to the Sql Data Source control on the update event.
What happens with this is that the source is being created every time the user submits the page.
This means that when the user does an update, the data from that update is lost.
NET Forum so that other people can learn from the experience too. -Frinny You may need to turn off validation even if you are not validating anything.