PDA

View Full Version : مبتدی: چطور رنگ شماره صفحه فعال توی گریدویو رو تغییر بدم



monire.6767
دوشنبه 06 آذر 1391, 14:26 عصر
سلام من گریدم رو صفحه بندی کردم بعد modeاون رو شمارس حالا میخوام رو هر صفحه گرید که میره شماره همون رنگش با شماره دیگر متفاوت باشه

dabirsiaghi
دوشنبه 06 آذر 1391, 16:00 عصر
95625

<asp:GridView ID="GridView1" runat="server" CssClass="GridView" AllowPaging="True"
OnPageIndexChanging="MyGridView_PageIndexChanging" Width="700px" PageSize="3">
<HeaderStyle BackColor="#CC6600" ForeColor="White" Height="30px" />
<PagerSettings Position="Bottom" PageButtonCount="5" NextPageText="Next" PreviousPageText=""
FirstPageText="&lt;&lt;" LastPageText="&gt;&gt;" Mode="NumericFirstLast" />
<PagerStyle CssClass="PagerGridView" HorizontalAlign="Center" BorderColor="Black"
BorderStyle="Solid" BorderWidth="1px" Height="35px" />
<RowStyle BackColor="White" Wrap="True" Height="30px" />
</asp:GridView>

استایلشم به این صورت بده

.GridView
{
text-align: center;
font-size: 12px;
margin-left: auto;
margin-right: auto;
}
.PagerGridView table td span
{
border: 1px solid Black;
text-decoration: none;
font-size: 14px;
padding: 3px;
background-color: Yellow;
color: Black;
}
.PagerGridView td a
{
border: 1px solid Black;
text-decoration: none;
font-size: 14px;
padding: 3px;
}

.PagerGridView td a:hover
{
border: 1px solid Black;
text-decoration: none;
font-size: 14px;
padding: 3px;
background-color: Black;
color: White;
}