Q: Get Text from Hyperlink Column?

  • Thread starter Thread starter Soul
  • Start date Start date
S

Soul

Hi,

I have a column in my DataGrid which is a Hyperlink Column. Everything work
fine except when I try to get the text of the column using
this.DataGrid.SelectedItem.Cells[6­ ].Text, I got blank value!!

People from some forum suggest to use ((LinkButton)
this.DataGrid.SelectedItem.Cells[6­ ].Controls[0]).Text, but I got
"Specified cast is not valid" error.

P.s. I am using codebehind method.

Please help.

Thank you.
 
Ok... I cast to wrong thing... it is a HyperLink, not LinkButton!

--
Soul


| Hi,
|
| I have a column in my DataGrid which is a Hyperlink Column. Everything
work
| fine except when I try to get the text of the column using
| this.DataGrid.SelectedItem.Cells[6 ].Text, I got blank value!!
|
| People from some forum suggest to use ((LinkButton)
| this.DataGrid.SelectedItem.Cells[6 ].Controls[0]).Text, but I got
| "Specified cast is not valid" error.
|
| P.s. I am using codebehind method.
|
| Please help.
|
| Thank you.
|
| --
| Soul
|
|
|
|
 
Back
Top