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

[Solved] How can I specify a CSS class for a grid hyperlink column

1 Answer 507 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dewang Shah
Top achievements
Rank 1
Dewang Shah asked on 28 Jan 2010, 03:26 PM
Hi,

I have seen some examples about changing the look of a link column by using CSS selectors. However, we have a grid that will be used on different pages for different data.
We need to be able to set a CSS class on the column the same way it can be set for the Grid itself or the Header and Footer.

I cannot see a CssClass property on GridHyperlinkColumn. Is there any other way of specifying the CSS class for the column?

Thanks,
Dewang

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 29 Jan 2010, 10:50 AM
Hi Dewang Shah,

You can assign a CSS class to a grid column's cells by using the column's ItemStyle-CssClass property. Note that hyperlinks normally do not inherit color and underline styles from parent elements, so if you want to set these, you will have to use a selector in the following format:

div.RadGrid   .MyColumnClass  a
{
       color: red ;
       text-decoration: none ;  /* or "underline" */
}



Kind regards,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Dewang Shah
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or