Gridview PagerStyle problem

K

kuangzhang

Dear MS Gurus,
I have read many posts on the Gridview pagerstyle problem but have yet
to see a fix or an work around.
Following is what I am experiencing:
in the Aspx Page I have this <PagerStyle CssClass="PagerSytle"/>

After render the Aspx page the HTML looks like this
<tr class="PagerStyle" >
<td colspan="9">
<table border="0">
<tr>
<td><span>1</span></td>
<td><a
href="javascript:__doPostBack('MyTasks$gvMy','Page$2')">2</a></td>
<td><a
href="javascript:__doPostBack('MyTasks$gvMy','Page$3')">3</a></td>
<td><a
href="javascript:__doPostBack('MyTasks$gvMy','Page$4')">4</a></td>
</tr>
</table>
</td>
From the above it easy to see why the style is not taking an effect.
With that said why is the gridview creating a subtable within the pager
tr/td? I can I get to that table to apply an style on it. Any help
would be greatly appreciated.
PS. I am not very sharp to please be specific ïŠ Thanks.
 
B

bruce barker \(sqlwork.com\)

use css inhertance:

<style>
tr.PagerStyle table {color:red}
tr.PagerStyle table tr {}
tr.PagerStyle table tr td {}
tr.PagerStyle table tr td span {color:blue}
tr.PagerStyle a {color:green}
</style>

-- bruce (sqlwork.com)

Dear MS Gurus,
I have read many posts on the Gridview pagerstyle problem but have yet
to see a fix or an work around.
Following is what I am experiencing:
in the Aspx Page I have this <PagerStyle CssClass="PagerSytle"/>

After render the Aspx page the HTML looks like this
<tr class="PagerStyle" >
<td colspan="9">
<table border="0">
<tr>
<td><span>1</span></td>
<td><a
href="javascript:__doPostBack('MyTasks$gvMy','Page$2')">2</a></td>
<td><a
href="javascript:__doPostBack('MyTasks$gvMy','Page$3')">3</a></td>
<td><a
href="javascript:__doPostBack('MyTasks$gvMy','Page$4')">4</a></td>
</tr>
</table>
</td>
From the above it easy to see why the style is not taking an effect.
With that said why is the gridview creating a subtable within the pager
tr/td? I can I get to that table to apply an style on it. Any help
would be greatly appreciated.
PS. I am not very sharp to please be specific ? Thanks.
 

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

Top