In this article I will show you that how you can validate the controls which are inside the Grid View control.
For this I will make the editable Grid View and use the Required Field Validator for the Text Boxes.
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.
Edit Index = -1 Show GV() End Sub Protected Sub gv Info_Row Updating(By Val sender As Object, By Val e As System.
If you are in Edit Mode, Edit Templete will appear.
Protected Sub gv Autorizzazioni_Row Command(By Val sender As Object, By Val e As System.
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.