The panel control can be seen when the code is in rowdatabound but not when the code is in rowcommand event. I already tried storing the e As System.Web.UI.WebControls.GridViewRowEventArgs in a global variable but when the code is in the rowcommand part, the value of the global variable is now 'Nothing'. Please help. Thanks!
Private Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
If e.CommandName = "show" Then
Dim pan2 As Panel = DirectCast(a.Row.FindControl("Panel1"), Panel)
pan.Visible = True
End If
End Sub
Private Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
Dim pan as panel
If e.Row.RowType = DataControlRowType.DataRow Then
pan = DirectCast(e.Row.FindControl("Panel1"), Panel)
End If

New Topic/Question
Reply




MultiQuote





|