hyperlink text in a datagrid?

Discussion in 'ASP .Net Datagrid Control' started by Tina, Oct 31, 2004.

  1. Tina

    Tina Guest

    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
    Tina, Oct 31, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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
    >
    Ken Cox [Microsoft MVP], Oct 31, 2004
    #2
    1. Advertising

  3. Tina

    Tina Guest

    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 [Microsoft MVP]" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    >> 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
    >>

    >
    Tina, Nov 1, 2004
    #3
    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. GaryB
    Replies:
    6
    Views:
    3,481
    Steven Cheng[MSFT]
    Nov 4, 2004
  2. Elton Pruitt
    Replies:
    2
    Views:
    5,787
    akjoshi
    Jun 12, 2006
  3. davetichenor
    Replies:
    1
    Views:
    808
    Eliyahu Goldin
    Oct 30, 2006
  4. Ken
    Replies:
    1
    Views:
    363
    Alvin Bruney
    Aug 16, 2003
  5. Dave
    Replies:
    0
    Views:
    927
Loading...

Share This Page