Gridview edit, click twice problem

前端 未结 2 620
天命终不由人
天命终不由人 2021-01-12 07:54

I am using a GridView and I encountered the click twice on the Edit link to see the edit fields problem. Following advice I am binding my GridView again on the .RowEditing h

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-12 08:29

    Found it. Needed to set the gridview's EditIndex and then do a databind.

    Private Sub gvReport_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles gvReport.RowEditing
        gvReport.DataSource = CType(Session("gvReport"), DataView)
        gvReport.EditIndex = e.NewEditIndex
        gvReport.DataBind()
    End Sub
    

提交回复
热议问题