views:

249

answers:

3

Hi

My question is, can I control the style of the paging element separately of top and bottom, I have set the paging to appear in both top and bottom of the gridview, and I want to see that the top pagination is little high up in the page, to do that I used the cssClass and set margin-top:20px and made the position: absolute, this does change the position of the top paging area and set it rightly for me, but the bottom pagination has also come up as a result and now sits inside the grid data!! Is there any way to solve this?

Thanks and regards Arunendra

+1  A: 

I suggest that you adjust your CSS, not the style associated with the GridView. Figure out what is causing the space that you want to negate, and eliminate that. Negative css margins is really unnecessary.

If you can't figure out what is causing the space, use FireFox with FireBug. Right click the area, select "Inspect Element". A couple windows will open... one with the html that is selected, and another showing the CSS that is effective in that area.

TheGeekYouNeed
A: 

Hi

Thanks for the reply. I have tried the Inspect element, all I can see that the gridview is broken into runtime table, and I have no table in the grid, so it is not possible to identify the lower paging element separately and thus I do not find any way to style it differently.

this is the line i have in the grid control

Any more idea on how to achieve this?

Thanks and regards Arunendra

Arunendra
A: 

Hi

thanks for all the replies. But, unfortunately they could not solve the problem, anyway, I have found the answer, the solution is to keep a different stylesheet for the bottompagerrow, and I have done it like this in the page load

Dim prow As GridViewRow prow = GridView1.BottomPagerRow prow.CssClass = "BottompagerRowStyle"

Since this page will always have data, I did not bother to check for the existence of the bottompager, which can be done additionally

thanks Arunendra

arunendra