473,395 Members | 1,412 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

I need help. build a link on a datagrid

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.idindi cador 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?

"Gabriël" <sp**@adiso.nl> escribió en el mensaje
news:10*************@corp.supernews.com...
Hello,

I use:

<asp:HyperLinkColumn Text="delete"
DataNavigateUrlField="HardwareAssetCFId"
DataNavigateUrlFormatString="StandardFields.aspx?d elete={0}">
<HeaderStyle HorizontalAlign="Left"
CssClass="gridHeader"></HeaderStyle>
<ItemStyle CssClass="gridFirstItem"></ItemStyle>
</asp:HyperLinkColumn>

The property Text will be displayed for every row, and the
DataNavigateUrlField, DataNavigateUrlFormatString together let you create
the link,

Greets,
Gab

"Luis E Valencia" <lu*******@haceb.com> schreef in bericht
news:eD**************@TK2MSFTNGP12.phx.gbl...
I want a row of the datagrid with a personalized link. The fields of the link are on the select related to the datagrid
the link would be accoiones.aspx?iddireccion=2&idindicador=5

I tried this but doesnt work
<ItemTemplate>

<asp:HyperLink runat="server" id="Hyperlink2"
NavigateUrl='acciones.aspx?iddireccion='<%#
DataBinder.Eval(Container,"DataItem.iddireccion"%> '&idindicador='<%#
DataBinder.Eval(Container,"DataItem.idindicador"%> '>link</asp:HyperLink>
</ItemTemplate>




Nov 18 '05 #1
0 1169

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: JingleBEV | last post by:
Hi all, I don't seem to get this going, possibly lacking the knowledge of dao recordset. I try to fill this Datagrid with the DAO.recordset, but it keeps giving me the error 13 - datatype...
1
by: Gilles T. | last post by:
I have calendar control in Javascript including in the Head of mu page: <script charset="iso-8859-1" language="JavaScript" src="popcalendar.js"></script> I call this calendar popup with a image...
1
by: Sunit Joshi | last post by:
Hello All I have an aspx with a datagrid having hyperlink colns. I open a popup window like this <asp:HyperLinkColumn DataTextFormatString="Click.." DataNavigateUrlField="ID" DataTextField="ID"...
2
by: Luis E Valencia | last post by:
I want a row of the datagrid with a personalized link. The fields of the link are on the select related to the datagrid the link would be accoiones.aspx?iddireccion=2&idindicador=5 I tried...
5
by: Luis E Valencia | last post by:
I need a link on a datagrid, the link must have fields of the database Like this acciones.aspx?iddireccion=1&idindicador=4 Thanks
1
by: Anna | last post by:
I have a simple DataGrid that displays a list of characteristics and allows you to edit a description for each characteristic. The query that feeds this involves a join, as the characteristics and...
3
by: Datatable Dataset Datagrid help | last post by:
Hi I am somewhat confused, I am new at VB.net I use XML data, I have a datagrid, I created a datatable so that I can create a custom format like true is this graphic false is this graphic and...
2
by: momo | last post by:
Hello Guys, I have a bit of a problem, I created a Dll called SecureQueryStringDll.dll and I had the dll put bin folder of my application first and it did not work so I then put it in the bin...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.