dotnetco.de

Formatting Gridview Page display

By default the gridview displays the page numbers unformatted even without any spaces between the page numbers. This makes it hard to read.

The grid view does not have properties to set it, but it could be formatted using CSS. Just add the following lines to your CSS:

.gridPager td
{
  padding-left: 4px;
  padding-right: 4px;
  padding-top: 1px;
  padding-bottom: 2px;
}

Then open your aspx and set the CSS Class of the Pager Style of the gridview to “gridPager”:

Leave a Comment