Gridview Sorting

M

Matt

I have sorting enabled on a gridview which changes the header text to a
hyperlink. I need to specify the hyperlink style (color specifically). I
can't globally set the hyperlink style at the page level due to differing
requirements throughout the page. I can't figure out how to change this when
I enable sorting. Any help? Thanks!
 
P

Phillip Williams

The CSS2 specification allows a syntax for descendants and child selectors
http://www.w3.org/TR/REC-CSS2/selector.html#descendant-selectors

So if one adds a HeaderStyle in the GridView markup:
<HeaderStyle cssClass=â€GridViewHeaderâ€/>
Then one can format the links in the header using the descendants selectors
like this:
<style>
..GridViewHeader a:link{/* style definition */}
..GridViewHeader a:hover{/*style definition */}
..GridViewHeader a:visited {/*style definition */}
</style>
 

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,139
Messages
2,570,805
Members
47,351
Latest member
LolaD32479

Latest Threads

Top