Software Technology Tips

In Datagrid [or] GridView Paging when last page contains less number of records than  the page size, the pager will move upward.
Example:-
 
 
Datagrid PageSize = 15 and 75 records  are returned  from DB, then pager will show 5 pages. If 70 records are returned, pager will show 5 pages and if the 4th ( last page) page is clicked pager will move upwards, i.e pager  will take  the position just after the 10th record  and not at the end of the datagrid as in other pages.
 
If you want to fix that pager, add a css to pagerstyle.

  <PagerStyle CssClass="pager" Wrap="True" Mode="NumericPages" Position="Bottom"></PagerStyle>
 
Pager rendered as TD.
 
CSS 

TR.pager TD
{
 left: 0px;
 width: 958px;
 border-right-style: solid;
 position: absolute;
 top: 380px;
 height: 20px;
 text-align: right;
 border-right-color: navy;
}
 
Adjust left,width,position,top according to datagrid size and position.


Related Tags:

ASP.NET

Author: Jnana Swain

ASP.NET

Let us Connect!

iso 9001 QA25 Red Herring STPI D&B Fastest Growing SME 2013 Award zinnov Nasscom

copyright (c) Mindfire Solutions 2007-2014. Login