Page header for a table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an HTML table that is many pages long. How can I create a header that
repeats on each printed page?
Is there a way within CSS to do that?
 
Clinton,
No, I don't want any paging. I want to send all the pages to the printer
with one click.
Arne
 
as always, there are various ways of doing this, depending on your
particular needs.

One way:

You can use javascript to insert a copy of your header row after every
x rows in your HTML table.
Then use CSS (style.pageBreakBefore="always") to set a page break
before every copy of the header
And use a CSS rule @media screen { .PrintOnly {display: none; }} to
hide the additional header rows on the screen

what UA are you using ? I have a simple HTC to do all this in case you
are using IE.

Another way to do the same thing is to modily your "onDataBound"
(assuming you're using a datagrid) to add those additional header rows
(Tricky, but doable).

This exercise becomes trivial If using a repeater, and almost scary if
using a datalist

Hope this helps
-- addup --
 

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

Back
Top