I need help. build a link on a datagrid

L

Luis E Valencia

Read from above to top.


I didnt understand.

This is the code that fills that datagrid

Public Sub pasar(ByVal sender As System.Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs)

If IsPostBack Then

Dim iddireccion As Int16 = dgdir.DataKeys(e.Item.ItemIndex)

'lblmetas.Text = "Indicadores para la direccion seleccionada"

Dim selectCMD2 As SqlCommand = New SqlCommand("select * from tblrelinddir,
tblheaderindicador where
tblheaderindicador.idindicador=tblrelinddir.idindicador and
tblrelinddir.iddireccion=" & iddireccion & "", SqlConnection1)

selectCMD2.CommandTimeout = 30

Dim custDA2 As SqlDataAdapter = New SqlDataAdapter

custDA2.SelectCommand = selectCMD2

Dim custDS2 As DataSet = New DataSet

custDA2.Fill(custDS2, "tblindicadormeta")

dgmetas.DataSource = custDS2.Tables("tblindicadormeta").DefaultView

If custDS2.Tables("tblindicadormeta").Rows.Count = 0 Then

' lblmetas.Text = "NO hay indicadores en esta direccion"

dgmetas.Visible = False

' panelmeta.Visible = False

Else

dgmetas.DataBind()

dgmetas.Visible = True

'panelmeta.Visible = False

End If

End If

End Sub





and I need two fields on the link that are on the table called RELINDDIR a
fiels is called idireccion and the other is idindicador



and I want the link to show acciones.aspx?idindicador=2&iddireccion=4



can u help me a little more?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top