Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView1.RowDeleting
cn = New SqlConnection(" Write Connection String ")
da = New SqlDataAdapter("select * from s_reg", cn)
Dim cmd As SqlCommandBuilder = New SqlCommandBuilder(da)
ds = New DataSet
da.Fill(ds)
ds.Tables(0).Rows(e.RowIndex).Delete()
da.Update(ds)
GridView1.DataSource = ds
GridView1.DataBind()
End Sub