2009-11-06

How to change the selected page number color in asp:GridView

Add the following lines in to css file.

.pager span 
{
    color:#000000;
    font-family: "Trebuchet MS";
    font-size: 14px;
    line-height: 20px;
}

Note: You can change the styles accordingly.

Add the following line in between <asp:GridView></asp:GridView> tags.

<PagerStyle BackColor="#EBEBEB" BorderColor="#EBEBEB" BorderStyle="Solid"
                        HorizontalAlign="Right" CssClass="pager" ForeColor="#0049B2" />

Fore color is the default color for page numbers other than the selected page.

No comments: