GridView sorting

I

IT

Hi
I use GridView in ASP.NET 2.0. When I set property AllowSorting, style of
header is changed. There appear LinkButtons with default style (blue
ForeColor). I need change ForeColor this LinkButtons only in one GridView,
but I dont know how. Anybody knows?
Mac
 
D

Dr. Know

IT said:
Hi
I use GridView in ASP.NET 2.0. When I set property AllowSorting, style of
header is changed. There appear LinkButtons with default style (blue
ForeColor). I need change ForeColor this LinkButtons only in one GridView,
but I dont know how. Anybody knows?
Mac

Not sure I completely understand your questions, but try adding these
to your series of control definitions:

<HeaderStyle BackColor="#990000" Font-Bold="True" Font-Size="12px"
ForeColor="#FFFFFF" HorizontalAlign="Left" Height="22px" />

Change as appropriate.

FWIW,

Dr. Know
 
Joined
Jul 31, 2006
Messages
2
Reaction score
0
define in css:

.GridViewHeader,
.GridViewHeader a:link,
.GridViewHeader a:visited
{
background-color: Black;
color: White;
}

then add in your <asp:GridView ...>
<HeaderStyle CssClass="GridViewHeader" />

this sets the color of the LinkButtons for sorting to the same color as normal header text
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top