Hyperlink column in datagrid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • go2hema
    New Member
    • May 2006
    • 1

    Hyperlink column in datagrid

    hi,
    i tried to display a database table in datagrid.
    i've inserted a hyperlink column. But all the hyperlinks work as similar.
    i want each of the hyperlink to work differently.
    what can i do?
  • mohan21_kumar
    New Member
    • May 2006
    • 4

    #2
    Select the Property for the Datagrid,Double Click the ItemDataBound event of the Datagrid. Take the object of the hyper link by using
    if(e.Item.ItemT ype == ListItemType.Al ternatingItem || e.Item.ItemType == ListItemType.It em)
    {
    HyperLink hypView;
    hypView = (HyperLink)e.It em.FindControl( "hypEdit");
    //Now from here you can change the behavior of the hyperlink by changing the property of the hyperlink

    }

    Comment

    Working...