473,624 Members | 2,394 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5907
Matt try posting something.
If possible your CSS class
Patrick

"Matt" <Ma**@discussio ns.microsoft.co m> wrote in message
news:90******** *************** ***********@mic rosoft.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" AutoGenerateCol umns="False"
CssClass="gridv iew" GridLines="Both " ShowFooter="Tru e" EmptyDataText=" No User
Accounts associated with this School." BorderColor="#4 04040"
BorderStyle="So lid" BorderWidth="1p x" CellPadding="2" EnableTheming=" False"
UseAccessibleHe ader="False">
<FooterStyle BackColor="DimG ray" BorderColor="Di mGray"
BorderStyle="So lid" BorderWidth="1p x" ForeColor="DimG ray" />
<Columns>
<asp:TemplateFi eld HeaderText="Edi t">
<ItemTemplate >
<asp:ImageButto n ID="EditButton1 " runat="server"
ImageUrl="~/Images/Edit.GIF"
CommandArgument ='<%# Eval("sAMAccoun tName") %>'
CommandName="Ed itUser" />
</ItemTemplate>
<ItemStyle HorizontalAlign ="Center"
VerticalAlign=" Middle" Wrap="True" />
<FooterTemplate ><asp:Button ID="btnNew" runat="server"
Height="26px" Text="Add User" CommandName="Ne wUser" /></FooterTemplate>
</asp:TemplateFie ld>
<asp:TemplateFi eld HeaderText="Pas sword"><ItemTem plate>
<asp:ImageButto n ID="CPButton1" runat="server"
ImageUrl="~/Images/password.GIF"
CommandArgument ='<%# Eval("sAMAccoun tName") %>'
CommandName="Se tPassword" />
</ItemTemplate> <ItemStyle HorizontalAlign ="Center"
VerticalAlign=" Middle" Wrap="True" />
</asp:TemplateFie ld>
<asp:TemplateFi eld HeaderText="Del ete">

<ItemTemplate >
<asp:ImageButto n ID="DeleteButto n1" runat="server"
ImageUrl="~/Images/DELETE.GIF"
CommandArgument ='<%# Eval("sAMAccoun tName") %>'
CommandName="De leteUser" />
</ItemTemplate>
<ItemStyle HorizontalAlign ="Center"
VerticalAlign=" Middle" Wrap="True" />
</asp:TemplateFie ld>
<asp:BoundFie ld HeaderText="Fir st Name"
DataField="Firs tName">
<ItemStyle HorizontalAlign ="Left"
VerticalAlign=" Middle" Wrap="False" />
</asp:BoundField>
<asp:BoundFie ld HeaderText="Las t Name"
DataField="Last Name">
<ItemStyle HorizontalAlign ="Left"
VerticalAlign=" Middle" Wrap="False" />
</asp:BoundField>
<asp:BoundFie ld HeaderText="Use r Login" DataField="UPN" >
<ItemStyle HorizontalAlign ="Left"
VerticalAlign=" Middle" Wrap="False" />
</asp:BoundField>
<asp:BoundFie ld HeaderText="Rol e" DataField="Role " />
<asp:BoundFie ld DataField="sAMA ccountName"
HeaderText="sAM AccountName" Visible="False" />
</Columns>
<RowStyle BackColor="Whit eSmoke" BorderColor="Di mGray"
BorderStyle="So lid" BorderWidth="1p x" />
<SelectedRowSty le BackColor="#000 099" Font-Bold="True"
ForeColor="Whit e" CssClass="heade r" />
<PagerStyle BackColor="#CCC CCC" ForeColor="Blac k"
HorizontalAlign ="Left" />
<HeaderStyle CssClass="gridv iewheader" BorderColor="Di mGray"
BorderStyle="So lid" BorderWidth="1p x"/>
<PagerSetting s Mode="NextPrevi ousFirstLast" />
<AlternatingRow Style BackColor="Gain sboro"
BorderColor="Bl ack" BorderStyle="So lid" BorderWidth="1p x" />
</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%;
}

..gridviewheade r
{
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**@discussio ns.microsoft.co m> wrote in message
news:90******** *************** ***********@mic rosoft.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
1947
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 do not print. On the Print Preview dialog, they display the same as above with the gridlines on the first page but not on subsequent pages. How do I fix this? Thanks,
1
3216
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 in print preview and when I turn css off in Opera. Could it be a problem with my css? The code is: html{ padding-top: 0; padding-bottom: 0;
2
1545
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 showing gridlines. I am not able to find a way to hide these gridlines ? Please could help me out.
0
1000
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 showing gridlines. I am not able to find a way to hide these gridlines ? Please could help me out. With regards,
0
1736
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 opens or saves the spreadsheet, Excel has turned off the gridlines. The gridlines can be restored in the Excel options screen manually. Does anyone know of a way to export the spreadsheet and show gridlines without the user having to turn them...
2
3815
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 horizontal scroll bar reaches the max limit the value indicated is only 91? Changing the big step value to 1 solves the issue but I want to be able to take big steps without writing side effect code to do so. Any suggestions?
2
7662
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
5034
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 http://www.developersdex.com ***
2
5235
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 exceeds its initial width, such as a long web address. In this case, I would like the horizontal overflow to be active. However, it seems that if I affix the style overflow-x:auto, then IE6 will cover the bottom line (of the text) with the...
0
8240
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8175
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8680
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8482
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7168
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6111
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2610
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.