Q: Get Text from Hyperlink Column

S

Soul

Hi,

I have a column in my DataGrid which is a Hyperlink Column. Everything work
find except when I try to get the text of the column using
this.DataGrid.SelectedItem.Cells[6].Text, I got blank value!! I saw from
some peoples suggesting to use ((LinkButton)
this.DataGrid.SelectedItem.Cells[6].Controls[0]).Text, but I got "Specified
cast is not valid" error.

Please help.

Thank you.
 
S

Soul

Just found that I cast to wrong thing... it should be HyperLink but not
LinkButton!

--
Soul


| Hi,
|
| I have a column in my DataGrid which is a Hyperlink Column. Everything
work
| find except when I try to get the text of the column using
| this.DataGrid.SelectedItem.Cells[6].Text, I got blank value!! I saw from
| some peoples suggesting to use ((LinkButton)
| this.DataGrid.SelectedItem.Cells[6].Controls[0]).Text, but I got
"Specified
| cast is not valid" error.
|
| Please help.
|
| Thank you.
|
| --
| Soul
|
|
|
|
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top