Asp net detailsview not updating
I get the correct display, then I click Edit, then edit some dropdownlist with SQLData Source and some textboxes.
Then I click Update, nothing happen, still same old value and no error.
Ok, Now I'm sure this was working the other day and I don't think I've changed anything but now it's not working and I can't see anything wrong with the code.
Basically I have a details view with product information in it, when the user clicks edit it goes into edit mode when I change any of the fields and click update it updates but with the old values.
I wanted to do my custom implementation for the Update command instead of using the Data Binding Object sources but I found my self in trouble with several road blocks.
Problem 1: When clicking on the Edit button the Details View will not change the mode until the second click.
A Details View Update Event Args object is passed to the event handler, which allows you to determine the index of the record being updated and to indicate that the update operation should be canceled.
To cancel the update operation, set the Cancel property to .
I solved this problem by changing the mode in the Mode Changing event handler and then rebinding the Details View control.The Details View control allows you to insert, edit and delete records.Building the Sample Description Initially, I have loaded data from a database to details view, each record is displayed in the details view of each page.After the user clicks the update button to edit and update selected record details, if he or she clicks the Add Row Button then they will be able to add a new record to the database.I was stocked for sometime using the 2.0 Details View control to Edit/Update data.
Thanks Regards I have included the primary key in SELECT and it now works fine.