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

Remove hyperlink underline

1 Answer 294 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Savyo
Top achievements
Rank 1
Savyo asked on 27 Jul 2012, 07:11 AM
Hi,
     I have this problem with removing the underline of hyperlink column. Can anybody help me with this.
thanks
Savyo

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 Jul 2012, 07:13 AM
Hi,

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["UniqueName"].Controls[0];
    link.CssClass = "remove";
 }
}

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

Thanks,
Shinu.
Tags
Grid
Asked by
Savyo
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or