Horizontal Gridlines not showing up

G

Guest

I can not get the horizontal gridlines to show up on a Gridview. I have
changed the selection to both and horizontal with no sign of them. Also,
when I set the Gridlines property to Vertical or Both, the Vertical lines
show up but they are the wrong color. Which property controls the color of
the gridlines? I have tried using a stylesheet to set the border of the
rows, footer, and header but this does not work either. The page does not
have any other styles associated with it.

Thanks for any assistance you can provide.

Matt Adams
 
G

Guest

Hi Patrick,

Thanks for the suggestion. Here is the gridview markup.

<asp:GridView ID="gvUsers" runat="server" AutoGenerateColumns="False"
CssClass="gridview" GridLines="Both" ShowFooter="True" EmptyDataText="No User
Accounts associated with this School." BorderColor="#404040"
BorderStyle="Solid" BorderWidth="1px" CellPadding="2" EnableTheming="False"
UseAccessibleHeader="False">
<FooterStyle BackColor="DimGray" BorderColor="DimGray"
BorderStyle="Solid" BorderWidth="1px" ForeColor="DimGray" />
<Columns>
<asp:TemplateField HeaderText="Edit">
<ItemTemplate>
<asp:ImageButton ID="EditButton1" runat="server"
ImageUrl="~/Images/Edit.GIF"
CommandArgument='<%# Eval("sAMAccountName") %>'
CommandName="EditUser" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"
VerticalAlign="Middle" Wrap="True" />
<FooterTemplate><asp:Button ID="btnNew" runat="server"
Height="26px" Text="Add User" CommandName="NewUser" /></FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Password"><ItemTemplate>
<asp:ImageButton ID="CPButton1" runat="server"
ImageUrl="~/Images/password.GIF"
CommandArgument='<%# Eval("sAMAccountName") %>'
CommandName="SetPassword" />
</ItemTemplate> <ItemStyle HorizontalAlign="Center"
VerticalAlign="Middle" Wrap="True" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Delete">

<ItemTemplate>
<asp:ImageButton ID="DeleteButton1" runat="server"
ImageUrl="~/Images/DELETE.GIF"
CommandArgument='<%# Eval("sAMAccountName") %>'
CommandName="DeleteUser" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"
VerticalAlign="Middle" Wrap="True" />
</asp:TemplateField>
<asp:BoundField HeaderText="First Name"
DataField="FirstName">
<ItemStyle HorizontalAlign="Left"
VerticalAlign="Middle" Wrap="False" />
</asp:BoundField>
<asp:BoundField HeaderText="Last Name"
DataField="LastName">
<ItemStyle HorizontalAlign="Left"
VerticalAlign="Middle" Wrap="False" />
</asp:BoundField>
<asp:BoundField HeaderText="User Login" DataField="UPN">
<ItemStyle HorizontalAlign="Left"
VerticalAlign="Middle" Wrap="False" />
</asp:BoundField>
<asp:BoundField HeaderText="Role" DataField="Role" />
<asp:BoundField DataField="sAMAccountName"
HeaderText="sAMAccountName" Visible="False" />
</Columns>
<RowStyle BackColor="WhiteSmoke" BorderColor="DimGray"
BorderStyle="Solid" BorderWidth="1px" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True"
ForeColor="White" CssClass="header" />
<PagerStyle BackColor="#CCCCCC" ForeColor="Black"
HorizontalAlign="Left" />
<HeaderStyle CssClass="gridviewheader" BorderColor="DimGray"
BorderStyle="Solid" BorderWidth="1px"/>
<PagerSettings Mode="NextPreviousFirstLast" />
<AlternatingRowStyle BackColor="Gainsboro"
BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" />
</asp:GridView>

Here is the css file

..gridview
{
border-color:Black;
border-style: solid;
border-width: thin;
padding:2 4 2 4;
font-family: Tahoma;
color:Black;
Height: 1px;
Width: 100%;
}

..gridviewheader
{
background-color:#696969;
border-color:#696969;
color:#FDCC0F;
font-weight: bold;
font-size:medium;
vertical-align: middle;
text-transform: capitalize;
font-family: Tahoma;
text-align: center;
width: 100%;
}

Thanks for any suggesstions.

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top