Gridview rowupdating in asp

Rated 4.45/5 based on 732 customer reviews

Every one can use it to compare the new value with old ones.

After searching long and hard I found a great article that solved my issue.

event is raised when a row's Update button is clicked, but before the Grid View control updates the row.

This enables you to provide an event-handling method that performs a custom routine, such as canceling the update operation, whenever this event occurs.

In this article, I am going to explain how to manipulate data using Grid View control.

In practical scenario you should use your existing architecture to populate and update the data.

New Edit Index 'Bind data to the Grid View control. Bind Data() End Sub Private Sub Create Data Table() Dim cmd As New System.

Dim dt = CType(Session("dt"), Data Table) 'Update the values.

In my VB Gridview, I had bind several column from datatable into one single column of the gridview. The following is the VB code: Protected Sub Grid View1_Row Editing(By Val sender As Object, By Val e As Grid View Edit Event Args) 'Set the edit index. Bind Data() End Sub Protected Sub Grid View1_Row Canceling Edit(By Val sender As Object, By Val e As Grid View Cancel Edit Event Args) 'Reset the edit index. Edit Index = -1 'Bind data to the Grid View control.

But I have no idea how to get those value when doing Row Editing & Row Updating. Bind Data() End Sub Protected Sub Grid View1_Row Updating(By Val sender As Object, By Val e As Grid View Update Event Args) 'Retrieve the table from the session object.

Leave a Reply