Row updating event in gridview in asp net using c
For more information on the Activation behavior, see Activation. You must have a supported data source for this type of automatic update to occur. In this article, I am going to take a simple database table that has following fields: Auto ID - Int, Auto Increment, Primary Key Page Name - Varchar(50) Page Description - Varchar(500) Active - Bit(1) In this article, I am not going to explain the workings of Sql objects but focusing on the events and methods of the Grid View that will help us in updating and deleting the records.
When Cancel link is clicked on Grid View in edit mode, On Row Canceling Edit event will fire that will call Cancel Record method.
I will be using Sql objects directly into methods to keep the example simple and straight forward.
In practical scenario you should use your existing architecture to populate and update the data.
Open() Dim command As New Sql Command(sql, connection) adapter.
Page Protected Sub Page_Load(By Val sender As Object, By Val e As System. Load Dim adapter As New Sql Data Adapter() Dim ds As New Data Set() Dim i As Integer = 0 Dim sql As String = Nothing Dim connetion String As String = "Data Source=.; Initial Catalog=pubs; User ID=sa; Password=*****" sql = "select * from publishers" Dim connection As New Sql Connection(connetion String) connection.
Search for row updating event in gridview in asp net using c:
Attributes("onmouseout") = "this.style.background Color='white';" e.