DataGridItemEventArgs and Hyperlinkcolumn

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a dataset (ds) and a Hyperlinkcolumn as the first column.

I want to extract the text of the displayed hyperlink (DataTextField) within
the DataGridItemEventArgs object.

So I try the trusty e.Item.Cells(0).Text. It is blank for a hyperlink column.

I also tried something like e.Item.Cells(0).Controls(0).ToString.

Still no go.

What am I missing?
 
I have a dataset (ds) and a Hyperlinkcolumn as the first column.

I want to extract the text of the displayed hyperlink (DataTextField) within
the DataGridItemEventArgs object.

So I try the trusty e.Item.Cells(0).Text. It is blank for a hyperlink column.

I also tried something like e.Item.Cells(0).Controls(0).ToString.

Still no go.

What am I missing?

not such a simple problem. Fritz Onion has a good example of how to
solve this.

GridViewRow row =
(GridViewRow)((Control)e.CommandSource).Parent.Parent;

http://pluralsight.com/blogs/fritz/archive/2005/06/24/11975.aspx
Peter Kellner
http://peterkellner.net
 

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

Similar Threads

How to Select Datagrid Row 4
HyperLinkColumn 2
HyperLinkColumn problem 8
Using HyperlinkColumn! 4
HyperLinkColumn 2
hyperlinkcolumn 1
Hiding item in DataGrid 1
Datagrid - HyperLinkColumn 1

Back
Top