header row gridvew RRS feed

  • Question

  • User-1499457942 posted


      I have adminlte.css . I want Gridview Header row Forecolor = White , Background Color = Blue

    .table-striped > tbody > tr:nth-child(odd) > td,
    .table-striped > tbody > tr:nth-child(odd) > th{
    background-color: #cccccc;



    Thursday, December 20, 2018 2:25 PM

All replies

  • User-1174608757 posted

    Hi JagjitSingh,

    According to your description I have made a sample here. Gridview will be rendered into a table when it finally shows in browser.Its header row is essentially  th of the table.So it makes conflict that you both set the Header row background-color and th color.I guess you want the head row color is blue and content row color is white-grey.I have made a sample here, I hope it can help you.


    <head runat="server">
        <link href="../Content/bootstrap.css" rel="stylesheet" />
            .adminlte th {
                color:white ;
            .table-striped>tbody>tr:nth-child(odd)>td {
        <form id="form1" runat="server">
                <asp:GridView ID="GridView1" runat="server" CssClass="adminlte table-striped" Height="310px" Width="355px" >

    It shows as below:

    Friday, December 21, 2018 2:53 AM