/    Sign up×
Community /Pin to ProfileBookmark

Force Table Cell Show When Printed

I’m adapting an Excel spreadsheet to an ASP.NET page. The spreadsheet is used for scheduling where the resource’s comitment to a date is shown by simply changing the cells color say from white to black. I’ve been able to replicate the same functionality by simply changing the cells background-color as needed. However when I printed the page, none of the highlighted cells are displayed. The are properly rendered as highlighted when the page is viewed on-screen.

Do I need to explicity place a character in the cells?

Is there something else going on?

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@kiwibritAug 02.2010 — Write a [url=http://webdesign.about.com/cs/css/a/aa042103a.htm]stylesheet for print[/url]. I presume you are using gridview bout to the Excel data? You may get more help if the mods move this thread to the asp.net section if you need to take this further.
Copy linkTweet thisAlerts:
@dch3Aug 07.2010 — Write a [url=http://webdesign.about.com/cs/css/a/aa042103a.htm]stylesheet for print[/url]. I presume you are using gridview bout to the Excel data? You may get more help if the mods move this thread to the asp.net section if you need to take this further.[/QUOTE]

Nope. I'm using a repeater with a a placeholder. The repeaters ItemBound event creates a table for entry with 1 cell for the description and 31 cells for the dates. As it loops through creating the cells, it checks to see if the cell's backcolor could be changed to denote a date.
Copy linkTweet thisAlerts:
@tracknutAug 07.2010 — Unfortunately, html table backgrounds do not print. That's just the way it works. Any chance you can place an image in the table, rather than a background?

Dave
Copy linkTweet thisAlerts:
@dch3Aug 08.2010 — Unfortunately, html table backgrounds do not print. That's just the way it works. Any chance you can place an image in the table, rather than a background?

Dave[/QUOTE]


Yes, I have to provide a print-specific page since I wrap the information in a scrolling div.
×

Success!

Help @dch31969 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...