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

Where's the text in a hyperlink col?

I'm going through a DataGridItem looking to find the text in a hyperlink
column. It's not in mydataGridItem.cells(3).text. Where is it?
thanks,
T
Nov 18 '05 #1
6 1497
Hi Tiny,

Try setting trace="true" in your page so you can see all of the objects that
appear. You might find that there are literal controls in the item that you
haven't accounted for.

Ken

MVP [ASP.NET]
"Tina" <ti**********@removespamexcite.com> wrote in message
news:e2**************@TK2MSFTNGP12.phx.gbl...
I'm going through a DataGridItem looking to find the text in a hyperlink
column. It's not in mydataGridItem.cells(3).text. Where is it?
thanks,
T


Nov 18 '05 #2
The trace is a mess that shows up behind my controls and report - unreadable
as is often the case. You would think there would be some docs on such a
thing.
T

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:uR*************@TK2MSFTNGP15.phx.gbl...
Hi Tiny,

Try setting trace="true" in your page so you can see all of the objects
that appear. You might find that there are literal controls in the item
that you haven't accounted for.

Ken

MVP [ASP.NET]
"Tina" <ti**********@removespamexcite.com> wrote in message
news:e2**************@TK2MSFTNGP12.phx.gbl...
I'm going through a DataGridItem looking to find the text in a hyperlink
column. It's not in mydataGridItem.cells(3).text. Where is it?
thanks,
T

Nov 18 '05 #3
Hi,

It wont be accessible through mydataGridItem.cells(3).text. You need to
access your control inside controls collection in a cell, for example.

mydataGridItem.cells(3).Findcontrol("yourcontrolna me") or
mydataGridItem.cells(3).control(0)

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Tina" <ti**********@removespamexcite.com> wrote in message
news:e2**************@TK2MSFTNGP12.phx.gbl...
I'm going through a DataGridItem looking to find the text in a hyperlink
column. It's not in mydataGridItem.cells(3).text. Where is it?
thanks,
T

Nov 18 '05 #4
The Immediate window readout is....
?item.Cells(3).Controls(0)
{System.Web.UI.WebControls.HyperLink}
[System.Web.UI.WebControls.HyperLink]:
{System.Web.UI.WebControls.HyperLink}
BindingContainer: {System.Web.UI.WebControls.DataGridItem}
ClientID: "dgbudgets__ctl2__ctl0"
Controls: {System.Web.UI.ControlCollection}
EnableViewState: True
ID: Nothing
NamingContainer: {System.Web.UI.WebControls.DataGridItem}
Page: {ASP.TestFeeder_aspx}
Parent: {System.Web.UI.WebControls.TableCell}
Site: Nothing
TemplateSourceDirectory: "/GridPrinter"
UniqueID: "dgbudgets:_ctl2:_ctl0"
Visible: True

but there is no text value or ID that could get a text value. I use
findcontrol a lot for template columns but using the column name with
findcontrol finds nothing. I know the text has to be in there somewhere.
T

"Saravana" <sa******@sct.co.in> wrote in message
news:Dl****************@news.cpqcorp.net...
Hi,

It wont be accessible through mydataGridItem.cells(3).text. You need to
access your control inside controls collection in a cell, for example.

mydataGridItem.cells(3).Findcontrol("yourcontrolna me") or
mydataGridItem.cells(3).control(0)

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Tina" <ti**********@removespamexcite.com> wrote in message
news:e2**************@TK2MSFTNGP12.phx.gbl...
I'm going through a DataGridItem looking to find the text in a hyperlink
column. It's not in mydataGridItem.cells(3).text. Where is it?
thanks,
T


Nov 18 '05 #5
I've been lurking this conversation because I have the same need. Neither
of those two methods work. The first doesn't work because a hyperlink is
not a template column. The second, ...control(0) show a hyperlink object
but no text or anything that contains the text. I'll try a new thread on
this. seems nobody knows.
G

"Saravana" <sa******@sct.co.in> wrote in message
news:Dl****************@news.cpqcorp.net...
Hi,

It wont be accessible through mydataGridItem.cells(3).text. You need to
access your control inside controls collection in a cell, for example.

mydataGridItem.cells(3).Findcontrol("yourcontrolna me") or
mydataGridItem.cells(3).control(0)

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Tina" <ti**********@removespamexcite.com> wrote in message
news:e2**************@TK2MSFTNGP12.phx.gbl...
I'm going through a DataGridItem looking to find the text in a hyperlink
column. It's not in mydataGridItem.cells(3).text. Where is it?
thanks,
T


Nov 18 '05 #6
If you post your code, i will tell you the exact way to find the text of
that hyperlink. Surely you can find it using the method i mentioned in
previous post.

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Tina" <ti**********@removespamexcite.com> wrote in message
news:eo**************@TK2MSFTNGP14.phx.gbl...
The Immediate window readout is....
?item.Cells(3).Controls(0)
{System.Web.UI.WebControls.HyperLink}
[System.Web.UI.WebControls.HyperLink]:
{System.Web.UI.WebControls.HyperLink}
BindingContainer: {System.Web.UI.WebControls.DataGridItem}
ClientID: "dgbudgets__ctl2__ctl0"
Controls: {System.Web.UI.ControlCollection}
EnableViewState: True
ID: Nothing
NamingContainer: {System.Web.UI.WebControls.DataGridItem}
Page: {ASP.TestFeeder_aspx}
Parent: {System.Web.UI.WebControls.TableCell}
Site: Nothing
TemplateSourceDirectory: "/GridPrinter"
UniqueID: "dgbudgets:_ctl2:_ctl0"
Visible: True

but there is no text value or ID that could get a text value. I use
findcontrol a lot for template columns but using the column name with
findcontrol finds nothing. I know the text has to be in there somewhere.
T

"Saravana" <sa******@sct.co.in> wrote in message
news:Dl****************@news.cpqcorp.net...
Hi,

It wont be accessible through mydataGridItem.cells(3).text. You need to
access your control inside controls collection in a cell, for example.

mydataGridItem.cells(3).Findcontrol("yourcontrolna me") or
mydataGridItem.cells(3).control(0)

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Tina" <ti**********@removespamexcite.com> wrote in message
news:e2**************@TK2MSFTNGP12.phx.gbl...
I'm going through a DataGridItem looking to find the text in a hyperlink column. It's not in mydataGridItem.cells(3).text. Where is it?
thanks,
T



Nov 18 '05 #7

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

Similar topics

4
by: Dynamo | last post by:
Not sure if this is a php or an html question but I'll post it anyway. I have multiple thumbnail images on my catalogue page catalogue.php and they are all hyperlinked to a single page called...
0
by: Nel | last post by:
I am trying to write a content management section for a web site. I have managed so far to use htmlarea to give users a basic, but user friendly interface by which to edit the page content. ...
3
by: deko | last post by:
I store hyperlinks as text in a table like this: Invoice11-21-2003.pdf#file://P:\Finance\PrefVendors\Receipts\Invoice11-21-20 03.pdf I need to run a report that lists the documents - or...
6
by: GaryB | last post by:
Does anyone have any idea how to get the text out of a hyperlink column in a web datagrid? It's a hyperlink column, not a template column so findcontrol does not work and there is no apparent...
19
by: Joe | last post by:
I have an aspx page (referred to here as page_1) with a datagrid whose first column contains hyperlinks. When a user clicks one of these hyperlinks, he will navigate to another aspx page (referred...
3
by: sohan | last post by:
hi I have hyperlink column in a datagrid. The column contains the name of a text file. I am able to appendthe full path of the file. The file is on D drive on the server. But on clicking on...
3
by: Bren | last post by:
Hi All VS2005 Gridview control with vb I am populating a gridview of company staff. One of the columns is a hyperlink to a SMS texting facility I have so secrataries can text the managers...
3
by: avanti | last post by:
HI, I have a HyperLink in my code. It has a OnClick function defined. I am trying to access the text property of the HyperLink in my JavaScript function. ...
4
by: alun65 | last post by:
I'm attempting to programmatically build up some HTML in the code behind. Like so: // Create Hyperlink HyperLink link = new HyperLink(); link.NavigateUrl = "nice cat"; link.Text = "Cats...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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...
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,...

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.