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

remove underline

1 Answer 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sigma
Top achievements
Rank 1
Sigma asked on 10 Dec 2012, 10:31 AM
How can i remove underline in gridhyperlink column ?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 10 Dec 2012, 10:36 AM
Hi Sigma,

Try the following code snippet to remove underline from HyperLinkColumn.

ASPX:
<telerik:GridHyperLinkColumn DataTextField="CompanyName" DataNavigateUrlFields="CompanyName" UniqueName="GridHyperLinkColumn" >
</telerik:GridHyperLinkColumn>

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

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

Regards,
Princy.
Tags
Grid
Asked by
Sigma
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or