473,395 Members | 1,462 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,395 software developers and data experts.

Include gridlines when printing

Hello...
I have an .aspx page that has a grid control.
It works fine but when you print.. the gride
lines only show on the 1st page.

Has anyone experienced anything like this or
can anyone shed any light on this.. ?

thanks in advance,
bob.
Dec 12 '05 #1
2 1527
This is all CSS.... programmers usually don't know it but CSS controls
all presentational aspects of a page for every media type (pda, audio,
screen, print)

Printing uses a print media css sheet.

You will want to try to enforce this...

Put this in the <head></head> section

<link rel="stylesheet" type"text/css" href="print.css" media="print" />

in print.css do this...

td {
border: 1px solid #000;
}

IE has a big with this (big surprise!), so you can't really set
multiple media types at a time. This should work though... this is in
addition to your other style sheet (I assume you're using proper CSS,
not the deprecated border="1")

Dec 12 '05 #2
Thanks for the reply...

I've added <link rel="stylesheet" type"text/css" href="print.css"
media="print" />
to the <head></head> section...
and
td {
border: 1px solid #000;
}
to the CSS.
I assume you're using proper CSS, not the deprecated border="1"
-- I'm using the default CSS. I have no experience with changing CSS at
all.

the changes have made no impact.
it still only shows the gridlines on the 1st page.
Is this because I am using the default CSS?
<ag******@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com... This is all CSS.... programmers usually don't know it but CSS controls
all presentational aspects of a page for every media type (pda, audio,
screen, print)

Printing uses a print media css sheet.

You will want to try to enforce this...

Put this in the <head></head> section

<link rel="stylesheet" type"text/css" href="print.css" media="print" />

in print.css do this...

td {
border: 1px solid #000;
}

IE has a big with this (big surprise!), so you can't really set
multiple media types at a time. This should work though... this is in
addition to your other style sheet (I assume you're using proper CSS,
not the deprecated border="1")

Dec 12 '05 #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...
5
by: middletree | last post by:
Like many people here, I've been trying to generate a spreadsheet on an ASP page. In my case, it's Intranet, so I can't provide you with a link. But the problem I have been fighting is a simple...
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...
1
by: ANSWER | last post by:
Hi, I have Employee database in MS Access. Now I want to include picture of employees near personal contacts. 1/ How can I do that 2/ Where am I going to save them. Thanks
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...
3
by: Lars Netzel | last post by:
Hi! How can I get ONLY vertical Gridlines WITHOUT a border around the whole grid? I have "GridLines=vertical" and "BorderStyle=None" and still I have a border around the whole grid! /Lars
2
by: Matt | last post by:
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...
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...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.