Last post Mar 04, 2007 04:12 PM by Russ Helfand
Mar 02, 2007 10:23 AM|thomasabcd|LINK
It seems I cannot work with a gridview's pagerstyle when using the CSS adapters. Eg<PagerStyle ForeColor="white" BackColor="white" /> doesn't affect the pagerstyle. Some of my Gridviews have different background colors so I cannot just change the CSS in
the CSS Adapters since that would affect all gridviews.
Mar 04, 2007 04:12 PM|Russ Helfand|LINK
Hi TIA Thomas, you can use something like this:
<PagerStyle CssClass="foobar" />
That will cause the GridView adapter to render a <div class="foobar"> around the page cell content. You can then write CSS rules with selectors that start with #foobar. That causes the rule to be used for the content in that <div>.
Remember, the adapters specifically ingnore attributes like ForeColor and BackColor. The idea when you use the adapters is that you will take responsibility for setting such display characteristics for your page via the page's CSS rules. The adapters spit
out clean HTML, with no inline styles, etc. All that display-related information is going to be in your CSS files so the adapters just need to render PREDICTABLE markup so you can write your CSS rules to match that markup. Make sense?
You might want to re-read this part of the white paper,
http://www.asp.net/cssadapters/whitepaper.aspx#SamplesArchitecture. It says much about the overall architecture and approach of these adapters.