473,405 Members | 2,415 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,405 software developers and data experts.

build a personalized link on a datagrid

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
2 1517
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 #2
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 #3

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

Similar topics

2
by: Tyler Lyon | last post by:
I am trying to find a free script that allows a user to register and login to their own personalized page that was automatically created when the user registered. I am creating a website where the...
10
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a...
4
by: John | last post by:
Greetings, all, Several days after adding personalized URLs to my "amazing" collection of "God Loves (yourname)" mazes, it occurred to me that if someone were to create an offcolor term, then...
0
by: Luis E Valencia | last post by:
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...
2
by: JenHu | last post by:
hi, I have a datagrid in my asp.net application, I am using vb.net language. I want to have my last column as a link column, link to text file. The link path is "c:\Temp\" & F_File_Name, which...
7
by: Girish | last post by:
OK.. phew. Playing with data grids for the past few days has been fun and a huge learning experience.. My problem. I have a requirement to display a gird with a gird. Within the embedded grid,...
4
by: sydney.luu | last post by:
Hello, I would greatly appreciate if someone can show me how to dynamically build a Repeater with unknown number of columns at design time. I have looked various threads in this newsgroup,...
1
by: Michael | last post by:
Hello, Does anyone know how to create a personalized url? For example, I would like my site http://www.mysite.com to offer it's users the ablity to create personalized urls like...
3
by: Pam1234 | last post by:
Hi everyone, This is a broad question but I'm hoping someone can steer me in the right direction. I can write valid xhtml strict in the dark with my eyes shut but I'm a trial-and-error person when...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.