Updating in gridview

Introduction The Grid View control displays the values of a data source in a table.Each column represents a field, while each row represents a record.If you look closely you will notice that all the Drop Down List inside the Grid View contains the same information.In this article I will demonstrate that how you can have Drop Down List inside the Grid View exposing different information. Page Private con As New Sql Connection("Data Source=.; Initial Catalog=pubs; User ID=sa; Password=*****") Protected Sub Page_Load(By Val sender As Object, By Val e As System. Load If Not Is Post Back Then load Stores() End If End Sub Protected Sub load Stores() con. Data Bind() Dim columncount As Integer = grid View. Find Control("txtname"), Text Box) Dim stor_address As Text Box = Direct Cast(grid View. Find Control("txtaddress"), Text Box) Dim city As Text Box = Direct Cast(grid View.

updating in gridview-5

Now you can ask questions directly to me on my new site ASPForums. For example if the column name is Name its corresponding parameter name will be @Name.Once this is done the Sql Data Source will automatically pick values from respective Text Boxes inside the Grid View row to be edited.When the users need update a row in grid, they should use the Grid View Cell Information. It is able to access to this property via the Cells collection of every row.Before we assign an updated value to the Grid View Cell Information. Validate event, which might be disabled to prevent updating the value in a cell in grid.