--------------------------xt x = 1 i = i 1 Try ' Dim newvalue As String = e.
Save all or press "Ctrl S" and hit "F5" to run the page, the page will look as in the following image: Click on "Edit the Grid View", it will display Textboxes in each cell as in the following image: Edit the value(s) here and click on the Update link, it will update all the data or to remove it click on the "Delete" link above the image shown.
this is the function that is called by all control when sending information to the server.
I have therefore added the relevant xml, and when creating the grid, create the column as a Template Field and the Edit Item as a Drop Down List with its own Sql Data Source.
So far so good, this all works, the grid is displayed, the Drop Down List appears, filled with the correct data, shows the correct initial item and lets the user select another. The when trying to get the value from the Drop Down List in the Row Updating event, I cant find it. I create a Recursive Find Control method that ran through every control on the page, and it cant find it.-Frinny @Frinavale sorry frinny for my titile i use......Actually I made a data acces layer class, buiness logic layer class & presentation layer(page). In most of the books generally direct update query is written on aspx page under sql data source using update commnad property & do updation in grid view. Now i do not want to use update command or connection string in sql data source.I have created a gridview that is dynamic and binds the grid dynamically based on a table selected in a dropdown.I have worked through most of the issues like dynamically creating the update, delete statements etc except for one problem I'm having in retrieving the cell value while in the rowupdating event. To String() is always an error so I am unable to get the value to plug into the dynamic update statement. ") End If End Try Row Updating Dim row Index As Integer = e. Rows(row Index) sql = sql & 'Field A' sql = sql & "=" & Grid View1. C If there is no other way; I suppose I could define the fields dynamically and use the findcontrol to obtain the value during update mode; but I've not had any success dynamically defining the field names or labels.Before you can use any classes related to SQL Client data adapter, we need to import the Sql Client namespace in your application by using the following using statement.