GVA_RowUpdating事件中:
Dim row As GridViewRow = GVA.Rows(e.RowIndex)
Dim num As String = row.Cells(2).Text.Trim
Dim code As String = row.Cells(5).Text.Trim
Me.TextBox1.Text &= "++" + num + " " + code
我用這個方法,卻讀不了值,錯誤在哪裡呢?
經過幾種方法常識,可能他有其它的語法可以直接讀取,但是我目前是找不倒了。所以用現在可以解決問題的方法:
用模板列是可以讀取的:
Dim row As GridViewRow = GVA.Rows(e.RowIndex)
Dim num As String = CType(row.Cells(2).FindControl("TextBox3"), TextBox).Text
Dim code As String = CType(row.Cells(5).FindControl("Label3"), Label).Text