473,809 Members | 2,781 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.W ebControls.Data GridCommandEven tArgs)

If IsPostBack Then

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

'lblmetas.Text = "Indicadore s para la direccion seleccionada"

Dim selectCMD2 As SqlCommand = New SqlCommand("sel ect * from tblrelinddir,
tblheaderindica dor where
tblheaderindica dor.idindicador =tblrelinddir.i dindicador and
tblrelinddir.id direccion=" & iddireccion & "", SqlConnection1)

selectCMD2.Comm andTimeout = 30

Dim custDA2 As SqlDataAdapter = New SqlDataAdapter

custDA2.SelectC ommand = selectCMD2

Dim custDS2 As DataSet = New DataSet

custDA2.Fill(cu stDS2, "tblindicadorme ta")

dgmetas.DataSou rce = custDS2.Tables( "tblindicadorme ta").DefaultVie w

If custDS2.Tables( "tblindicadorme ta").Rows.Cou nt = 0 Then

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

dgmetas.Visible = False

' panelmeta.Visib le = False

Else

dgmetas.DataBin d()

dgmetas.Visible = True

'panelmeta.Visi ble = 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?i dindicador=2&id direccion=4

can u help me a little more?

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

I use:

<asp:HyperLinkC olumn Text="delete"
DataNavigateUrl Field="Hardware AssetCFId"
DataNavigateUrl FormatString="S tandardFields.a spx?delete={0}" >
<HeaderStyle HorizontalAlign ="Left"
CssClass="gridH eader"></HeaderStyle>
<ItemStyle CssClass="gridF irstItem"></ItemStyle>
</asp:HyperLinkCo lumn>

The property Text will be displayed for every row, and the
DataNavigateUrl Field, DataNavigateUrl FormatString together let you create
the link,

Greets,
Gab

"Luis E Valencia" <lu*******@hace b.com> schreef in bericht
news:eD******** ******@TK2MSFTN GP12.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&i dindicador=5

I tried this but doesnt work
<ItemTemplate >

<asp:HyperLin k runat="server" id="Hyperlink2 "
NavigateUrl='ac ciones.aspx?idd ireccion='<%#
DataBinder.Eval (Container,"Dat aItem.iddirecci on"%>'&idindica dor='<%#
DataBinder.Eval (Container,"Dat aItem.idindicad or"%>'>link</asp:HyperLink>
</ItemTemplate>




Nov 18 '05 #1
0 1186

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

Similar topics

1
6078
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 mismatch. Can somesone shed some light please. I define rsDepartmentList as Dao.recordset
1
1677
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 link button and working very good: <asp:Textbox CssClass="edit_item" id="txtEditDernieresResolutions" runat="server" width="80"/> <a href='javascript:showCalendar(frmForm.imgDernieresResolutions,...
1
2183
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" HeaderText="Desc" DataNavigateUrlFormatString= "javascript:varwin=window.open('getDetails.aspx?ID={0}',null,'menubar=no,width=400,height=80');" /> The window opens fine, but when I close it the current frame window
2
1538
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 this but doesnt work <ItemTemplate> <asp:HyperLink runat="server" id="Hyperlink2" NavigateUrl='acciones.aspx?iddireccion='<%# DataBinder.Eval(Container,"DataItem.iddireccion"%>'&idindicador='<%#
5
1522
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
1243
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 their descriptions are in separate tables. The DataKeyField of the DataGrid is set to the description ID, but I also need to be able to access the characteristic ID in my update query (without displaying it in the DataGrid). I haven't had much...
3
2523
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 others. One of the custom format is as follows: dsmessages_dt.Columns.Add("Image", GetType(Image)) I had a problem of when I used a checkbox in the grid that was bound to the datatable that it would not update my dataset. So I created another...
2
1923
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 folder of c:\inetpub\wwwroot and it still does not work. Here is the error I get from it: temporary asp.net files\root\d16a94c5\8b912d73\assembly\dl2\1dc1ef5c\006575a4_827ac301\metabuilders.webcontrols.rowselectorcolumn.dll"...
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10639
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10120
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5688
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.