Groups | Blog | Home
all groups > asp.net webcontrols > april 2008 >

asp.net webcontrols : Applying CSS for gridview template column



Harsha
4/17/2008 4:48:43 AM
I am trying to apply predefined css class for gridview, Like

<asp:TemplateColumn HeaderText="Name">
<ItemTemplate>
<asp:HyperLink ID="hlFN1" runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.Name") %>'
CssClass="GridviewHyperlink" Target="_parent" NavigateUrl='<%#
DataBinder.Eval(Container, "DataItem.FileName") %>'>
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>

My class "GridviewHyperlink" is black color text without underline.

But when page gets rendered Column "Name" will come with blue
underlined text.

Any help please..

Regards
Sriharsha Karagodu
Stan
4/17/2008 8:43:23 AM
[quoted text, click to view]

Hi

Try these settings in the CSS file:

=2EGridviewHyperlink a:link
{
text-decoration: none;
color: black;
}

BTW make sure that the case in your attribute value is identical to
AddThis Social Bookmark Button