Dim index As Integer = gvRow.RowIndex
Dim reqID As String = myGridView.DataKeys.Item(index).Value() ' ได้
Dim SecName As String = myGridView.Rows(index).Cells(11).Text.ToString() ' ไม่ได้
Dim test As String = myGridView.DataKeys.Item(index).Value()
'Dim reqId1 As DropDownList = CType(myGridView.Rows(index).FindControl("txtEditRequestID"), DropDownList) ' ไม่ได้
'Dim SecName1 As DropDownList = CType(myGridView.Rows(index).FindControl("txtEditSection"), DropDownList) ' ไม่ได้
End Sub
ช่วยหน่อยครับโผม
Tag : .NET, Ms SQL Server 2012, HTML/CSS, Web (ASP.NET), VS 2008 (.NET 3.x), Windows
มันได้ได้ครับเพราะว่า ByVal sender As Object, ByVal e As EventArgs พอผมจะแก้มันก็ Error ครับ
Code (VB.NET)
Protected Sub ExportFile(ByVal sender As Object, ByVal e As EventArgs)
End Sub
แต่ถ้าเป็นแบบนี้
Code (VB.NET)
Sub modUpdateCommand(ByVal s As Object, ByVal e As GridViewUpdateEventArgs)
'*** Section ***'
Dim txtSection As TextBox = CType(myGridView.Rows(e.RowIndex).FindControl("txtEditSection"), TextBox)
End Sub