Q: Get Text from Hyperlink Column

Discussion in 'ASP .Net Datagrid Control' started by Soul, Jan 29, 2004.

  1. Soul

    Soul Guest

    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
     
    Soul, Jan 29, 2004
    #1
    1. Advertising

  2. Soul

    Soul Guest

    Re: Get Text from Hyperlink Column

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

    --
    Soul


    "Soul" <> wrote in message
    news:...
    | 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
    |
    |
    |
    |
     
    Soul, Jan 30, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Soul
    Replies:
    1
    Views:
    477
  2. =?Utf-8?B?V2FyYW4=?=

    HyperLink Column and Button Column in a DataGrid

    =?Utf-8?B?V2FyYW4=?=, Aug 9, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    604
    =?Utf-8?B?V2FyYW4=?=
    Aug 9, 2005
  3. =?Utf-8?B?ZGF2aWQ=?=
    Replies:
    11
    Views:
    1,010
    deandany
    Jul 17, 2006
  4. davetichenor
    Replies:
    1
    Views:
    839
    Eliyahu Goldin
    Oct 30, 2006
  5. Dave
    Replies:
    0
    Views:
    952
Loading...

Share This Page