GridView's NewValues and OldValues empty in the OnRowUpdating event

前端 未结 5 2106
南旧
南旧 2020-12-20 14:26

I have the GridView below. I am binding to a custom datasource in the code behind. It gets into the \"OnRowUpdating\" event just fine, but there are no NewValues or OldVal

5条回答
  •  别那么骄傲
    2020-12-20 15:30

    Bind in the Page PreRender event handler like this:

    Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
        GridBinder()
    End Sub
    

    NB: PreRender takes place after the RowUpdating event.

提交回复
热议问题