Gridview rowupdating commandargument
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 want to provide my user a Gridview filled with data from database, allowing him to edit these records not in order to update the database, but in order to insert edited rows in db as new records through a stored procedure.
Protected Sub gv Autorizzazioni_Row Command(By Val sender As Object, By Val e As System.
I need to retreive the Data Key of the selected row in a Grid View.
Curiously, the Command Argument passed in the On Row Command event is set to NULL.
The problem is: when I retrieve data using Grid View. Grid View Command Event Args) Handles gv Autorizzazioni. Command Name = "Crea Autorizz") Then Dim str Per Insert As String = "" Dim index As Integer = Convert. Command Argument) Dim row As Grid View Row = gv Autorizzazioni.
With that solution, my problem is that I dont always have the key display in the data column. Im pretty sure this information will serve me one day, but for now, I will keep my solution because I like to have all the postback, initiated by a click, in the On Row Command event.