Rowupdating event in gridview

By combining these controls, you can easily set up master-detail views using very little code and sometimes no code at all.

From the following chapters you can see some important operations in ASP.

In this article we create a Gridview from database and add some additional operations such a add, edit and delete data in the Grid View control.

In the previous article , we learned how to create a simple Grid View at runtime .

Grid View control Row Command event will give you the Product ID of the product from the Grid View Rows when user will click any of the button in the Grid View. To handle click event of the buttons in Grid View you need to handle Row Command event of the Grid View control. 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. Following code will show you how you can get Row Index, Product ID and Command Name of the button when user click any button in the Grid View. Protected Sub Grid View1_Row Command(By Val sender As Object, By Val e As System. I have in my Grid View the Column(Validate), this column in contains two values 'v' or 'notv' I want to get the value 'v' from my Gridview and change it to 'VALIDATE' and the other 'notv' to 'Not validate'..

277

Leave a Reply