-
May 24th, 2014, 06:06 PM
#1
Thread Starter
Frenzied Member
Change GridView Sort Link from blue to different color
Tried this:
<HeaderStyle CssClass="headerstyle" />
And in the css:
.headerstyle a{
text-decoration:none;
color:#7dad4a;
display:block;
}
But nothing...
Sean
Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.
-
May 25th, 2014, 11:08 AM
#2
Re: Change GridView Sort Link from blue to different color
Using ASP.NET 4.0 with masterpage, what I did was create an external css file and add reference to it in the aspx file.
External css file (GridViewHeader.css)
css Code:
.gridViewHeader { height: 30px; background-color: #6DC2FF; font-size: 15px; border-color: #CCCCCC; border-style: Solid; border-width: 1px; } .gridViewHeader a { color: rgb(218, 81, 81); }
.aspx file with gridview using masterpage (Add Reference using link rel).
html Code:
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> <link rel="stylesheet" href="Styles/GridViewHeader.css"/> </asp:Content> <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <asp:GridView ID="GridVwPagingSorting" runat="server" AutoGenerateColumns="False" Font-Names="Verdana" AllowPaging="True" AllowSorting="True" PageSize="5" Width="75%" OnPageIndexChanging="PageIndexChanging" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" OnSorting="Sorting"> <AlternatingRowStyle BackColor="#BFE4FF" /> <PagerStyle BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" /> <HeaderStyle CssClass="gridViewHeader" /> ...... </asp:GridView> </asp:Content>
-
May 25th, 2014, 11:10 AM
#3
Re: Change GridView Sort Link from blue to different color
Using ASP.NET 4.0 with masterpage, what I did was create an external css file and add reference to it in the aspx file.
External css file (GridViewHeader.css)
css Code:
.gridViewHeader { height: 30px; background-color: #6DC2FF; font-size: 15px; border-color: #CCCCCC; border-style: Solid; border-width: 1px; } .gridViewHeader a { color: rgb(218, 81, 81); }
.aspx file with gridview using masterpage (Add Reference using link rel).
aspx Code:
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> <link rel="stylesheet" href="Styles/GridViewHeader.css"/> </asp:Content> <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <asp:GridView ID="GridVwPagingSorting" runat="server" AutoGenerateColumns="False" Font-Names="Verdana" AllowPaging="True" AllowSorting="True" PageSize="5" Width="75%" OnPageIndexChanging="PageIndexChanging" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" OnSorting="Sorting"> <AlternatingRowStyle BackColor="#BFE4FF" /> <PagerStyle BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" /> <HeaderStyle CssClass="gridViewHeader" /> ...... </asp:GridView> </asp:Content>
Last edited by KGComputers; May 25th, 2014 at 09:49 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|