I have a Multipage control with 3 pageviews, in one of them I put a grid within a Callback panel, in the page 1 I tried to bind the grid from a button with the following code:
Code: Visual Basic.NET
Using cnn As New Data.SqlClient.SqlConnection(Me.SqlDataSource1.ConnectionString)
Dim cmdPopulate As New Data.SqlClient.SqlCommand( _
"SELECT a.cmpPK, a.ubiPK, a.pisPK, b.pisName, a.upiST " & _
"FROM tCaMantUbiPiso a, tCaMantPiso b " & _
"WHERE a.cmpPK = @cmpPK AND a.ubiPK = @ubiPK AND a.pisPK = b.pisPK ", cnn)
cnnOpen()
cmdPopulate.Parameters.AddWithValue("@cmpPK", gcComp)
cmdPopulate.Parameters.AddWithValue("@ubiPK", txtubiPK.Text)
grdUbiPisos.DataSource = cmdPopulate.ExecuteReader
grdUbiPisos.DataBind()
grdUbiPisos.Visible = True
End Using
I already used this code successfully before, but not in a multipage, actually I made a test with a simply grdUbiPisos.Visible = .F. from a button located on the page one and the grid still no receiving the code that I’m trying to execute. The callback panel has the appropiate triggers.
Can you help me with this please? Thanks in advance, Best Regards