473,387 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Horizontal Gridlines not showing up

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
Apr 21 '06 #1
2 5897
Matt try posting something.
If possible your CSS class
Patrick

"Matt" <Ma**@discussions.microsoft.com> wrote in message
news:90**********************************@microsof t.com...
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

Apr 22 '06 #2
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

"Patrick.O.Ige" wrote:
Matt try posting something.
If possible your CSS class
Patrick

"Matt" <Ma**@discussions.microsoft.com> wrote in message
news:90**********************************@microsof t.com...
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


Apr 23 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Billy Jacobs | last post by:
I have a datagrid which I am using as a report in a web application. When I go to print the page from Internet Explorer, the gridlines on the first page print but on subsequent pages the gridlines...
1
by: Peter Mount | last post by:
Hi When I zoom into my site (http://www.petermount.au.com) with Opera 7.54 the horizontal scrollbar doesn't show when the site image is bigger than my screen. Yet the horizontal scrollbar shows...
2
by: Shreyas Madwanna | last post by:
Hi Gurus, I have an xml and xsl file. The xsl transforms the xml file to give an html output. Now using filesystem object I am saving the html output as a word document but the word document...
0
by: Shreyas Madwanna | last post by:
Hi Gurus, I have an xml and xsl file. The xsl transforms the xml file to give an html output. Now using filesystem object I am saving the html output as a word document but the word document is...
0
by: LouV | last post by:
The code below exports a datagrid from a dataset stored in a session variable without a hitch. It prompts the user if they would like to open or save the exported spreadsheet. But when the user...
2
by: Doug Carter | last post by:
I'm using a horizontal scroll bar control to represent teh default values of MIn 0 to Max 100. I assign the current value of the horizontal control to a label control.Text string but when the...
2
by: Brian | last post by:
Is there a way to remove the horizontal scroll bar on a TreeView control? I want to keep the vertical one.
2
by: Mike P | last post by:
I set Gridlines="None" and I still get gridlines in my GridView. Is there anything else that you need to do to totally remove gridlines? *** Sent via Developersdex...
2
by: Csaba Gabor | last post by:
I have a table that sizes to take up most of the page's width. The (mostly empty) rightmost cell of a particular row starts off as wide as it can, but it might be that it gets something that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.