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

remove underline

1 Answer 42 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tina
Top achievements
Rank 1
Tina asked on 15 Jun 2012, 05:37 AM
How to set css to remove underline in a gridhyperlinkcolumn

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 15 Jun 2012, 05:59 AM
Hi Tina,

Try the following code snippet to achieve your scenario.

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

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 = "class";
  }
}

Hope this helps.

Thanks,
Princy.
Tags
General Discussions
Asked by
Tina
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or