create a hyperlink?

Discussion in 'ASP .Net Datagrid Control' started by Fetty, May 31, 2005.

  1. Fetty

    Fetty Guest

    I have a dynamically created child grid inside of a grid. Each cell may or
    may not have a date in it. How do I make that date a hyperlink? Eack column
    has to have different links?

    --
    David Fetrow
    Helixpoint LLC
    717-571-9335
    http://www.helixpoint.com
     
    Fetty, May 31, 2005
    #1
    1. Advertising

  2. Fetty

    Elton Wang Guest

    Hi Fetty,

    You can implement your logic in datagrid_ItemDataBound event

    if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
    ListItemType.AlternatingItem)
    {
    DataRowView drv = (DataRowView)e.Item.DataItem; // data source as
    dataset/datatable/dataview
    HyperLink link = (HyperLink)e.Item.Cells[link_cell_index];
    link.NavigateUrl = dynamicUrl(drv["data_field"]);

    }

    HTH

    Elton Wang



    "Fetty" <> wrote in message
    news:...
    > I have a dynamically created child grid inside of a grid. Each cell may or
    > may not have a date in it. How do I make that date a hyperlink? Eack

    column
    > has to have different links?
    >
    > --
    > David Fetrow
    > Helixpoint LLC
    > 717-571-9335
    > http://www.helixpoint.com
    >
    >
     
    Elton Wang, May 31, 2005
    #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. Axel Dahmen

    Can't create fragment/JavaScript hyperlink

    Axel Dahmen, Feb 4, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    471
    Yunus Emre ALPĂ–ZEN
    Feb 4, 2005
  2. Replies:
    5
    Views:
    424
    Smita
    Jan 11, 2006
  3. davetichenor
    Replies:
    1
    Views:
    844
    Eliyahu Goldin
    Oct 30, 2006
  4. Ken
    Replies:
    1
    Views:
    387
    Alvin Bruney
    Aug 16, 2003
  5. Dave
    Replies:
    0
    Views:
    957
Loading...

Share This Page