GridView Edit Button Requires 2 Clicks

时光怂恿深爱的人放手 提交于 2019-12-01 07:36:04

I think you need to call DataBind to rebind the data source. You've commented it out, but it looks like you had it in a IsPostBack block, which would only execute on the initial page load.

Try:

Protected Sub EditRow(ByVal sender As Object, ByVal e As GridViewEditEventArgs)
    GridView1.EditIndex = e.NewEditIndex
    GridView1.DataSource = SqlDataSource1
    GridView1.DataBind()        
End Sub
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!