Gridview updating new values
The code below shows me the values in the Drop Down List, but when I update it with the “edit” of the Grid View row, the value does not get saved.
So I have my Gridview with Data Source set to a Data Table on page Load event : In the Click event of the button I want to retrieve current values of the controls, as displayed on Web page after user's actions, and pass them to my sp as a comma-separated string. Is Null Or Empty(str Add) = False Then str Per Insert = str Per Insert & str Add & "," '..so on to add values to string What to do to retrieve edited values? I also tried setting Edit Index to the index of "pseudo-edited" row, just before your code: Thanks, yousuf... I think Edit Index is nothing, because the whole Edit thing is never raised. Data Bind() End With End Sub Private Sub gv Test_Row Editing(By Val sender As Object, By Val e As System. On Row Updating I can now retrieve new values using "New Values" property for each field I need, then cancel updating and use new values for my purposes (here, build a string to use in a sp to insert a new record based on new values): Protected Sub gv Autorizzazioni_Row Updating(By Val sender As Object, By Val e As System. Please post the code for your Page_Load method and the that handles your Update (your C# code) so we can have a better look at what's going on. Please give some references and/or details of how to. This wipes out the data provided by the user during editing (editing happens after the page load). If you reset the Data Source at this stage, your values for updating will be lost. I actually don't know how to write the Row Updating function, I just found it from the internet, and so of course it's not working. Please give some references and/or details of how to. Ok what's happening is that you are binding the data source for the Grid View every time a postback occurs in the Page_Load method.