I have a problem at the time of updating the datagrid. I want that at the time of update data is shown in form instead of datagrid.
Code:
Public Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView1.RowEditing
GridView1.EditIndex = e.NewEditIndex
Call LoadItems2() 'binding data to grid
Dim id As Label = GridView1.Rows(e.NewEditIndex).Cells(1).FindControl("id".ToString())
Dim compno As Label = GridView1.Rows(e.NewEditIndex).Cells(1).FindControl("CompNo")
Dim compname As Label = GridView1.Rows(e.NewEditIndex).Cells(1).FindControl("CompName")
lblid.Text = id.Text
txt_CompNo.Text = compno.Text
txt_CompName.Text = compname.Text
btn_save.Enabled = True
End Sub
Comment