We help IT Professionals succeed at work.
Get Started

Cannot seem to get rid of alternating row color

Tom Knowlton
Tom Knowlton asked
on
240 Views
Last Modified: 2012-05-11
http://test.huskyshoponline.com//checkout.aspx?checkout=1go

(use mike for both username and password if you need to authenticate)

For the shipping method, the second row is grey.

I want to get rid of the grey color, but I can't find what is setting it to grey.


Here is the styling applied:
.grid-view
{
   padding: 0;
   margin: 0;
   border: 1px solid #fff;
   font-family: "Verdana, Arial, Helvetica, sans-serif, Trebuchet MS";
   font-size: 0.9em;
}

.grid-view tr.header
{
   color: Blue;
   background-color: White;
   height: 25px;
   vertical-align: middle;
   text-align: center;
   font-weight: bold;
}

.grid-view tr.normal
{
   color: Blue;
   background-color: White;
   height: 25px;
   vertical-align: middle;
   text-align: center;
}

.grid-view tr.alternate
{
   color: White;
   background-color: Blue;
   height: 25px;
   vertical-align: middle;
   text-align: center;
}

.grid-view tr.normal:hover
{
   background-color: Black;
   color: White;
   font-weight: bold;
}

.grid-view tr.alternate:hover
{
   background-color: Black;
   color: White;
   font-weight: bold;
}


.grid-view tr.selected
{
   background-color: Blue;
   color: White;
   font-weight: bold;
}

.grid-view tr.selected:hover
{
   background-color: White;
   color: Blue;
   font-weight: bold;
}

Open in new window



Here is the relevant page markup:
<asp:GridView ID="gvShipping" runat="server" AutoGenerateColumns="False" DataKeyNames="TABLE"
OnRowCommand="gvShipping_RowCommand" Visible="False" GridLines="None"
Width="350px" BorderStyle="Solid" BorderWidth="1px" EnableModelValidation="True"
OnRowCreated="gvShipping_RowCreated" 
        onselectedindexchanged="gvShipping_SelectedIndexChanged" 
        onrowdatabound="gvShipping_RowDataBound" CssClass="grid-view">
    <Columns>
        <asp:TemplateField HeaderStyle-HorizontalAlign="Right" 
            HeaderText="Select Shipping Method">
            <EditItemTemplate>
                <asp:TextBox ID="textBox1" runat="server" Text='<%# Bind("DISPLAY") %>'></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="lblDisplay" runat="server" CommandName="Select" 
                    Text='<%# Bind("DISPLAY") %>'></asp:Label>
            </ItemTemplate>
            <HeaderStyle HorizontalAlign="Left" />
            <ItemStyle HorizontalAlign="Left" />
        </asp:TemplateField>
        <asp:CommandField />
        <asp:TemplateField HeaderStyle-HorizontalAlign="Right" HeaderText="Amount">
            <EditItemTemplate>
                <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("AMOUNT") %>'></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="lblAmount" runat="server" Text='<%# Bind("AMOUNT") %>'></asp:Label>
            </ItemTemplate>
            <HeaderStyle HorizontalAlign="Right" />
            <ItemStyle HorizontalAlign="Right" Width="60px" />
        </asp:TemplateField>
        <asp:BoundField DataField="TABLE" HeaderText="Table" Visible="False" />
        <asp:ButtonField CommandName="Select" HeaderStyle-HorizontalAlign="Right" 
            HeaderText="Select" Text="Select">
        <HeaderStyle HorizontalAlign="Right" />
        <ItemStyle HorizontalAlign="Right" Width="60px" />
        </asp:ButtonField>
    </Columns>



Been staring at this for a while.  I think another pair of eyes could help me.



Tom


<EditRowStyle HorizontalAlign="Right" />
<HeaderStyle HorizontalAlign="Right" />
<RowStyle HorizontalAlign="Left" />
</asp:GridView>

Open in new window

Comment
Watch Question
Top Expert 2011
Commented:
This problem has been solved!
Unlock 1 Answer and 13 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE