hyperlink text in a datagrid?

T

Tina

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
 
K

Ken Cox [Microsoft MVP]

Hi Tina,

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]
 
T

Tina

I found a controls collection that has the hyperlink but nothing with the
value that shows in the grid.

?item.Cells(3).Controls.Item(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

Ken Cox said:
Hi Tina,

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 said:
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
 

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

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,097
Latest member
RayE496148

Latest Threads

Top