Detailsview not updating gridview best dating city in the u s
I was stocked for sometime using the 2.0 Details View control to Edit/Update data.
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.
The detailsview control changes back to read only and displays the original values. I have attached the code for the control and datasource below. ALTER PROCEDURE users_Update Faculty @EMAIL NVARCHAR(100), @ISLOCKEDOUT BIT, @MOBILENUMBER BIGINT, @USERNAME nvarchar(100) AS BEGIN UPDATE aspnet_Users SET [email protected] where [email protected] UPDATE ASPNET_MEMBERSHIP SET EMAIL = @EMAIL, LOWEREDEMAIL = LOWER(@EMAIL), [email protected] WHERE USERID = (SELECT USERID FROM ASPNET_USERS WHERE [email protected]) END Found the solution: The Select Columns and the Update Parameters should match in order to update using Sql Data Source, that means if you select(query or procedure) is returning 3 fields in gridview, then all of them should be the parameter for the update, you can miss out the actual updations in database if not required, but the I dont think your solution is OK, since I have to use the atribute Old Values Parameter Format String="original_" that means that I would have doble parameters, the ones with the original values and the ones with edited values. I have 4 parameters, Im getting the right values for 2 of them, an null at the others. For demonstration I have created a database (named Database.mdf) in which we have a table named tbl_Employee.
changing from VS2003 Data Grid to VS2010 Grid View; still on SQL Server 2000 so the wizards for autogenerating the code are not compatible. I get an Argument Out Of Range Exception on "row To Update("Quote DQty") = Quote List.
But I can't see why it wouldn't be bringing back the new textbox values.