RadGrid version |
RadGrid Q4 2007 or later
|
.NET version |
2.0
|
Visual Studio version |
2005
|
programming language |
C#, CSS
|
browser support |
all browsers supported by RadGrid
|
PROJECT DESCRIPTION
Printing a web page with a RadGrid control will usually make the grid span across several [paper] pages. Reading them might be hard and we may want to have the column headers available on each page. To achieve that we have to define a CSS setting that will be applied for the print media only. It will change the grid table's thead and tbody element display settings:
<style type="text/css"> |
@media print |
{ |
th |
{ |
font-family:Arial; |
color:black; |
background-color:lightgrey; |
} |
thead |
{ |
display:table-header-group; |
} |
tbody |
{ |
display:table-row-group; |
} |
} |
</style> |
The attached files contain a project with a single page bound to the Northwind sample products and a PDF file containing the printed pages.