This is a migrated thread and some comments may be shown as answers.

hyperlink

1 Answer 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tina
Top achievements
Rank 1
Tina asked on 04 Nov 2011, 01:59 AM
how can i remove the underline in hyperlinkcolumn?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 04 Nov 2011, 03:50 AM
Hello Tina,

Try the following code snippet to remove underline in hyperlinkcolumn.
C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
 if (e.Item is GridDataItem)
 {
    GridDataItem item = (GridDataItem)e.Item;
    HyperLink link = (HyperLink)item["GridHyperLinkColumn"].Controls[0];
    link.CssClass = "remove";
 }
}

CSS:
<style type="text/css">
 .remove   
  {
    text-decoration:none;
  }
</style>

-Shinu.
Tags
Grid
Asked by
Tina
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or